Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > problem in HttpWebResponse GetResponse

Reply
Thread Tools

problem in HttpWebResponse GetResponse

 
 
Taner Özyürekoglu
Guest
Posts: n/a
 
      05-24-2005
I have an error below. is there any idea about it.


Dim Req As HttpWebRequest =
WebRequest.Create("https://certification.authorize.net/gateway/transact.dll?"
& postdata)
Response.Write("3")
Req.Method = "POST"
Req.AllowAutoRedirect = True
Req.Proxy = System.Net.WebProxy.GetDefaultProxy()
Req.Timeout = 100000
Req.ProtocolVersion = HttpVersion.Version11
Req.ContentLength = postdata.Length
Req.ContentType = "application/x-www-form-urlencoded"
Req.KeepAlive = False
postdata = ""
Req.ContentLength = postdata.Length
Req.AllowWriteStreamBuffering = True

Dim result As String
Dim objResponse As HttpWebResponse = Req.GetResponse()
Dim sr As StreamReader
sr = New StreamReader(objResponse.GetResponseStream())
result = sr.ReadToEnd
Response.Write(result)
sr.Close()




An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[WebException: The underlying connection was closed: Unable to connect to
the remote server.]
System.Net.HttpWebRequest.CheckFinalStatus() +677
System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult) +140
System.Net.HttpWebRequest.GetResponse() +249
WebMeals.CC.Button1_Click(Object sender, EventArgs e)
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292


 
Reply With Quote
 
 
 
 
Ersin Gençtürk
Guest
Posts: n/a
 
      05-24-2005
do you have an internet connection at your web server ? it seems that you
can not connect to other web server


-ersin


"Taner Özyürekoglu" <(E-Mail Removed)> wrote in message
news:OIEW2f$(E-Mail Removed)...
> I have an error below. is there any idea about it.
>
>
> Dim Req As HttpWebRequest =
>

WebRequest.Create("https://certification.authorize.net/gateway/transact.dll?
"
> & postdata)
> Response.Write("3")
> Req.Method = "POST"
> Req.AllowAutoRedirect = True
> Req.Proxy = System.Net.WebProxy.GetDefaultProxy()
> Req.Timeout = 100000
> Req.ProtocolVersion = HttpVersion.Version11
> Req.ContentLength = postdata.Length
> Req.ContentType = "application/x-www-form-urlencoded"
> Req.KeepAlive = False
> postdata = ""
> Req.ContentLength = postdata.Length
> Req.AllowWriteStreamBuffering = True
>
> Dim result As String
> Dim objResponse As HttpWebResponse = Req.GetResponse()
> Dim sr As StreamReader
> sr = New StreamReader(objResponse.GetResponseStream())
> result = sr.ReadToEnd
> Response.Write(result)
> sr.Close()
>
>
>
>
> An unhandled exception was generated during the execution of the current

web
> request. Information regarding the origin and location of the exception

can
> be identified using the exception stack trace below.
>
> Stack Trace:
>
> [WebException: The underlying connection was closed: Unable to connect to
> the remote server.]
> System.Net.HttpWebRequest.CheckFinalStatus() +677
> System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult) +140
> System.Net.HttpWebRequest.GetResponse() +249
> WebMeals.CC.Button1_Click(Object sender, EventArgs e)
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String
> eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1292
>
>



 
Reply With Quote
 
 
 
 
Taner Özyürekoğlu
Guest
Posts: n/a
 
      05-24-2005
I have an internet connection on that site.
"Ersin Gençtürk" <ers[spam]@gencturk.org> wrote in message
news:(E-Mail Removed)...
> do you have an internet connection at your web server ? it seems that you
> can not connect to other web server
>
>
> -ersin
>
>
> "Taner Özyürekoglu" <(E-Mail Removed)> wrote in message
> news:OIEW2f$(E-Mail Removed)...
>> I have an error below. is there any idea about it.
>>
>>
>> Dim Req As HttpWebRequest =
>>

> WebRequest.Create("https://certification.authorize.net/gateway/transact.dll?
> "
>> & postdata)
>> Response.Write("3")
>> Req.Method = "POST"
>> Req.AllowAutoRedirect = True
>> Req.Proxy = System.Net.WebProxy.GetDefaultProxy()
>> Req.Timeout = 100000
>> Req.ProtocolVersion = HttpVersion.Version11
>> Req.ContentLength = postdata.Length
>> Req.ContentType = "application/x-www-form-urlencoded"
>> Req.KeepAlive = False
>> postdata = ""
>> Req.ContentLength = postdata.Length
>> Req.AllowWriteStreamBuffering = True
>>
>> Dim result As String
>> Dim objResponse As HttpWebResponse = Req.GetResponse()
>> Dim sr As StreamReader
>> sr = New StreamReader(objResponse.GetResponseStream())
>> result = sr.ReadToEnd
>> Response.Write(result)
>> sr.Close()
>>
>>
>>
>>
>> An unhandled exception was generated during the execution of the current

> web
>> request. Information regarding the origin and location of the exception

> can
>> be identified using the exception stack trace below.
>>
>> Stack Trace:
>>
>> [WebException: The underlying connection was closed: Unable to connect to
>> the remote server.]
>> System.Net.HttpWebRequest.CheckFinalStatus() +677
>> System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
>> +140
>> System.Net.HttpWebRequest.GetResponse() +249
>> WebMeals.CC.Button1_Click(Object sender, EventArgs e)
>> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>>

> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
> stBackEvent(String
>> eventArgument) +57
>> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
>> sourceControl, String eventArgument) +18
>> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
>> +33
>> System.Web.UI.Page.ProcessRequestMain() +1292
>>
>>

>
>



 
Reply With Quote
 
Ersin Gençtürk
Guest
Posts: n/a
 
      05-25-2005
ok.do you have the proper permissions to create internet connection ?

"Taner Özyürekoğlu" <(E-Mail Removed)> wrote in message
news:%23q$(E-Mail Removed)...
> I have an internet connection on that site.
> "Ersin Gençtürk" <ers[spam]@gencturk.org> wrote in message
> news:(E-Mail Removed)...
> > do you have an internet connection at your web server ? it seems that

you
> > can not connect to other web server
> >
> >
> > -ersin
> >
> >
> > "Taner Özyürekoglu" <(E-Mail Removed)> wrote in message
> > news:OIEW2f$(E-Mail Removed)...
> >> I have an error below. is there any idea about it.
> >>
> >>
> >> Dim Req As HttpWebRequest =
> >>

> >

WebRequest.Create("https://certification.authorize.net/gateway/transact.dll?
> > "
> >> & postdata)
> >> Response.Write("3")
> >> Req.Method = "POST"
> >> Req.AllowAutoRedirect = True
> >> Req.Proxy = System.Net.WebProxy.GetDefaultProxy()
> >> Req.Timeout = 100000
> >> Req.ProtocolVersion = HttpVersion.Version11
> >> Req.ContentLength = postdata.Length
> >> Req.ContentType = "application/x-www-form-urlencoded"
> >> Req.KeepAlive = False
> >> postdata = ""
> >> Req.ContentLength = postdata.Length
> >> Req.AllowWriteStreamBuffering = True
> >>
> >> Dim result As String
> >> Dim objResponse As HttpWebResponse = Req.GetResponse()
> >> Dim sr As StreamReader
> >> sr = New StreamReader(objResponse.GetResponseStream())
> >> result = sr.ReadToEnd
> >> Response.Write(result)
> >> sr.Close()
> >>
> >>
> >>
> >>
> >> An unhandled exception was generated during the execution of the

current
> > web
> >> request. Information regarding the origin and location of the exception

> > can
> >> be identified using the exception stack trace below.
> >>
> >> Stack Trace:
> >>
> >> [WebException: The underlying connection was closed: Unable to connect

to
> >> the remote server.]
> >> System.Net.HttpWebRequest.CheckFinalStatus() +677
> >> System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
> >> +140
> >> System.Net.HttpWebRequest.GetResponse() +249
> >> WebMeals.CC.Button1_Click(Object sender, EventArgs e)
> >> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> >>

> >

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
> > stBackEvent(String
> >> eventArgument) +57
> >> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> >> sourceControl, String eventArgument) +18
> >> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
> >> +33
> >> System.Web.UI.Page.ProcessRequestMain() +1292
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with HttpWebRequest GetResponse bg ASP .Net 5 05-12-2006 09:20 AM
HttpWebResponse GetResponse Taner Özyürekoglu ASP .Net Web Services 0 05-24-2005 01:01 AM
Please help !! Problem about HttpWebRequest - GetResponse() japslam japslam via DotNetMonster.com ASP .Net 5 04-22-2005 04:49 PM
HttpWebResponse/HttpWebRequest problem... Satinderpal Singh ASP .Net 2 06-04-2004 04:40 AM
problem with HttpWebRequest/HttpWebResponse... Satinderpal Singh ASP .Net 1 06-02-2004 03:18 PM



Advertisments