Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7173219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:46:42+00:00 2026-05-28T15:46:42+00:00

I have tried to integrate paypal sandbox with my project in asp.net. Redirection to

  • 0

I have tried to integrate paypal sandbox with my project in asp.net.

Redirection to paypal sandbox working extremely fine ! You can check out your cart ! You can make payment ! But the problem is when paypal set redirection to my Success.aspx page !

I got the error as

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.101:808

I am using stream writer Object !

Wait Let me post my code !

this is page_load even of Success.aspx

   protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                // Used parts from https://www.paypaltech.com/PDTGen/
                // Visit above URL to auto-generate PDT script

                authToken = WebConfigurationManager.AppSettings["PDTToken"];

                //read in txn token from querystring
                txToken = Request.QueryString.Get("tx");


                query = string.Format("cmd=_notify-synch&tx={0}&at={1}", txToken, authToken);

                // Create the request back
                string url = WebConfigurationManager.AppSettings["PayPalSubmitUrl"];
                HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);

                // Set values for the request back
                req.Method = "POST";
                req.ContentType = "application/x-www-form-urlencoded";
                req.ContentLength = query.Length;

                // Write the request back IPN strings
                StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
                stOut.Write(query);
                stOut.Close();

                // Do the request to PayPal and get the response
                StreamReader stIn = new StreamReader(req.GetResponse().GetResponseStream());
                strResponse = stIn.ReadToEnd();
                stIn.Close();

                // sanity check
                Label2.Text = strResponse;

                // If response was SUCCESS, parse response string and output details
                if (strResponse.StartsWith("SUCCESS"))
                {
                    PDTHolder pdt = PDTHolder.Parse(strResponse);
                    Label1.Text = string.Format("Thank you {0} {1} [{2}] for your payment of {3} {4}!",
                        pdt.PayerFirstName, pdt.PayerLastName, pdt.PayerEmail, pdt.GrossTotal, pdt.Currency);
                }
                else
                {
                    Label1.Text = "Oooops, something went wrong...";
                }
            }
        }

This sentence creates error !!

StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);

These type of exception occurs

    Exception Details: System.Net.Sockets.SocketException:
 A connection attempt failed because the connected party did
 not properly respond after a period of time, 
or established connection failed because connected
 host has failed to respond 192.168.0.101:808
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:46:43+00:00Added an answer on May 28, 2026 at 3:46 pm

    First off, do not mix PDT and IPN – just use IPN. Go into PayPal admin and make sure that the return URL is NOT set there and that PDT is NOT enabled.

    There is an IPN class available online just for this purpose – some more info (Caveat: my own blog post):

    http://codersbarn.com/?tag=/paypal

    http://paypalipnclass.codeplex.com/releases/view/31282

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the need to integrate some blob storage into an existing ASP.NET Mvc
I have a .NET site which integrates with PayPal. I am currently working with
I have tried to integrate the Picasa API on iPhone, compiles fine, but I
I have tried to integrate phpBB forum in Codeigniter project. I have placed the
Have tried to find solutions for this and can't really come up with anything.
I have tried to go through the jungle (really, PayPal, why don't you weed
I am trying to integrate a tumblr blog into a website. I have tried
I have tried looking all over the net for some help, and couldn't find
I have tried to integrate smile haarcascade (smileD_haarcascade_v0.05) in OpenCV but it only detect
We have to integrate our project with back end Oracle Platform. And this integration

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.