An Unexpected Error Occured On A Recive
Contents |
here for a quick overview of the the underlying connection was closed an unexpected error occurred on a receive wcf site Help Center Detailed answers to any questions you
The Underlying Connection Was Closed An Unexpected Error Occurred On A Receive C#
might have Meta Discuss the workings and policies of this site About Us
The Underlying Connection Was Closed An Unexpected Error Occurred On A Receive Web Service
Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs https://support.microsoft.com/en-us/kb/826210 Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ..The underlying connection was closed: An unexpected error http://stackoverflow.com/questions/21728773/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-receiv occurred on a receive up vote 3 down vote favorite 2 I have the following code: private Uri currentUri; private void Form1_Load(object sender, EventArgs e) { currentUri = new Uri(@"http://www.stackoverflow.com"); HttpWebRequest myRequest = (HttpWebRequest) HttpWebRequest.Create("http://www.stackoverflow.com"); WebProxy myProxy = new WebProxy("120.198.230.8:81"); myRequest.Proxy = myProxy; HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); webBrowser1.DocumentStream = myResponse.GetResponseStream(); webBrowser1.Navigating += new WebBrowserNavigatingEventHandler(webBrowser1_Navigating); } void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { if (e.Url.AbsolutePath != "blank") { currentUri = new Uri(currentUri, e.Url.AbsolutePath); HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(currentUri); HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); webBrowser1.DocumentStream = myResponse.GetResponseStream(); e.Cancel = true; } } after compiling: error: An unhandled exception of type 'System.Net.WebException' occurred in System.dll Additional information: The underlying connection was closed: An unexpected error occurred on a receive. at line HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); please help me c# share|improve this question edited Mar 11 '14 at 14:50 bl
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/Advanced ASP.NET/WCF, ASMX and other Web Services/The underlying connection was closed: An unexpected error occurred on... The underlying connection was closed: An unexpected error occurred on a receive. [Answered]RSS http://forums.asp.net/t/1114812.aspx?The+underlying+connection+was+closed+An+unexpected+error+occurred+on+a+receive+ 17 replies Last post Dec 21, 2009 07:31 PM by cindy998 ‹ Previous Thread|Next http://www.justskins.com/forums/the-underlying-connection-was-19287.html Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply phil.net None 0 Points 7 Posts The underlying connection was closed: An unexpected error occurred on a receive. May 25, 2007 03:08 AM|phil.net|LINK Hello, I'm developing a webservice (and client) for synchronization of files. WhenI try an unexpected to send big files,I always receive the following error: The underlying connection was closed: An unexpected error occurred on a receive. The file that i want to send is 80 MB big. To solve this problem i maked this configuration in the web.config:
closed: An unexpected error occurred on a send - ASP.NET > I know this has been done many times before but I think I have a more > unique case. > > I am using an XML-RPC wrapper ([url]http://www.xml-rpc.net/[/url]) to call a > webservice which I connect to using SSL and client certificates. I > have a library containing the calling code that is referenced in a > Windows Service and this service should wakeup when required and call > the XML-RPC service. > > I get the 'The underlying connection was closed: An unexpected error > occurred on a send' when calling it from the service. But when I ... Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode August 19th,03:34 PM #1 Re: The underlying connection was closed: An unexpected error occurred on a send > I know this has been done many times before but I think I have a more > unique case. > > I am using an XML-RPC wrapper ([url]http://www.xml-rpc.net/[/url]) to call a > webservice which I connect to using SSL and client certificates. I > have a library containing the calling code that is referenced in a > Windows Service and this service should wakeup when required and call > the XML-RPC service. > > I get the 'The underlying connection was closed: An unexpected error > occurred on a send' when calling it from the service. But when I call > it from a windows application it works fine. > > Now I have looked round to see why this could be happening and people > have suggested changing the KeepAlive property of the Web Request to > false. I have done this but no change in what happens. > > Does anyone have any idea why this could be happening and how I could > go about fixing it? > > Thanks in advance, > > > > Rob. I find that if I make a local request without SSL and Client Certificates it works fine. I have set the proxy value of the web request object to GlobalProxySelection.GetEmptyWebProxy() so it shouldn't be using a proxy server. I get the error on every request I make, not randomly like some people appear to get. Thankfully I have worked out a way round it if required involving wrapping the request in a webservice and calling that webservice from my Windows Service but that way isn't ni