Click here to Skip to main content
15,893,190 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: The SMTP host was not specified. Pin
Christian Graus14-Jun-08 3:37
protectorChristian Graus14-Jun-08 3:37 
GeneralRe: The SMTP host was not specified. Pin
iamdking14-Jun-08 20:55
iamdking14-Jun-08 20:55 
Questionconfirmation dialog box in asp.net 2.0 Pin
vijaylumar14-Jun-08 1:18
vijaylumar14-Jun-08 1:18 
AnswerRe: confirmation dialog box in asp.net 2.0 Pin
Christian Graus14-Jun-08 3:38
protectorChristian Graus14-Jun-08 3:38 
Questiondifference between events and functions Pin
Pankaj Garg14-Jun-08 1:15
Pankaj Garg14-Jun-08 1:15 
AnswerRe: difference between events and functions Pin
Christian Graus14-Jun-08 3:36
protectorChristian Graus14-Jun-08 3:36 
AnswerRe: difference between events and functions Pin
Meysam Mahfouzi15-Jun-08 2:54
Meysam Mahfouzi15-Jun-08 2:54 
Questionexception "The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF" Pin
trilokharry13-Jun-08 23:07
trilokharry13-Jun-08 23:07 
req.GetRequestStream().Length' threw an exception of type 'System.NotSupportedException'

I'm getting this error while implementing paypal payment process.
when control going to this statement in asp.net page after coming back from payment process completion.

StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());

code:

string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
//string strLive = "https://www.paypal.com/cgi-bin/webscr";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);

req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
strRequest += "&cmd=_notify-validate";
if (strRequest != "&cmd=_notify-validate")
{
req.ContentLength = strRequest.Length;

//Send the request to PayPal and get the response
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();

//ERROR in below 2 statements some time ---right now not coming
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();

You get the best out of others when you give the best of yourself.

Questionchange listwidth of dropdownlist in asp.net 2.0 Pin
vijaylumar13-Jun-08 21:50
vijaylumar13-Jun-08 21:50 
AnswerRe: change listwidth of dropdownlist in asp.net 2.0 Pin
Anand Desai13-Jun-08 21:55
Anand Desai13-Jun-08 21:55 
QuestionSecurity Module Pin
iamdking13-Jun-08 21:37
iamdking13-Jun-08 21:37 
AnswerRe: Security Module Pin
leppie13-Jun-08 21:43
leppie13-Jun-08 21:43 
GeneralRe: Security Module Pin
iamdking13-Jun-08 21:52
iamdking13-Jun-08 21:52 
Questionpassing arralist in querystring in asp.net c# Pin
VijayVishwakarma13-Jun-08 21:26
VijayVishwakarma13-Jun-08 21:26 
AnswerRe: passing arralist in querystring in asp.net c# Pin
leppie13-Jun-08 21:43
leppie13-Jun-08 21:43 
QuestionPlace your current page path on Label Pin
Rajeshiam13-Jun-08 21:24
Rajeshiam13-Jun-08 21:24 
AnswerRe: Place your current page path on Label Pin
Christian Graus14-Jun-08 3:39
protectorChristian Graus14-Jun-08 3:39 
Questiondrop down list in asp.net 2.0 Pin
vijaylumar13-Jun-08 21:07
vijaylumar13-Jun-08 21:07 
AnswerRe: drop down list in asp.net 2.0 Pin
Anand Desai13-Jun-08 21:22
Anand Desai13-Jun-08 21:22 
QuestionHow a pdf file open in new window Pin
Masood Kochi,SSF13-Jun-08 20:43
Masood Kochi,SSF13-Jun-08 20:43 
AnswerRe: How a pdf file open in new window Pin
Anand Desai13-Jun-08 20:58
Anand Desai13-Jun-08 20:58 
Questionurl rewriting Pin
Pankaj Garg13-Jun-08 18:40
Pankaj Garg13-Jun-08 18:40 
QuestionProblem using FillSchema Pin
FerJones13-Jun-08 14:18
FerJones13-Jun-08 14:18 
AnswerRe: Problem using FillSchema Pin
Parwej Ahamad13-Jun-08 18:46
professionalParwej Ahamad13-Jun-08 18:46 
QuestionRe: Problem using FillSchema [modified] Pin
FerJones14-Jun-08 6:09
FerJones14-Jun-08 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.