.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

"The underlying connection was closed: The connection was closed unexpectedly"

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net
 

Hi,

Im working with this Arquitecture : 

Web Service  -> DLL(Xml Translator)  -> Asp.net.

Everything works fine, but,i have a process that takes about 23 minutes, in that time i show a "loading screen" that avoid the user to do anything, but  after 20 mins while the web service is working and after debug my code, i get this error :

"The underlying connection was closed: The connection was closed unexpectedly"

Then, my "loading screen" keep visible until  the web service completes the work, and after that, the "loading" hides and the web form shows my gridview empty.(its should show data).

Regards and thanks.






View Complete Post


More Related Resource Links

Exception: "The underlying connection was closed: The connection was closed unexpectedly." (sometime

  
I have a windows app connecting to a webservice.  In some situation(s) (haven't narrowed it down enough), I get the following exception: The underlying connection was closed: The connection was closed unexpectedly. When this exception is thrown, it is calling a method of a web reference. Now the situation that we experience this is on a laptop in the field that is using a WWAN connection in at least one location.  It works fine in the lab at the office.  Anyone have any ideas what could be causing this?

"The underlying connection was closed: The connection was closed unexpectedly."

  
HI, I am getting error as "The underlying connection was closed: The connection was closed unexpectedly." The problem occured when data is heavy. i have set to maxBufferpool size and MAxBoolsize also high. Stack Trace of the Error: Server stack trace:    at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)    at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)    at System.ServiceModel.Channels.ClientReliableChannelBinder`1.RequestClientReliableChannelBinder`1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode)    at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)    at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout)    at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout)    at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan tim

...The underlying connection was closed: The connection was closed unexpectedly. at System.Net.Web

  

I have a WCF service with the following lines of code:

WebClient Client = new WebClient();

Stream strm = Client.OpenRead(fPath); < -- Exception Occurs exactly here

Everything works great when I am hosting the service via the ASP.NET Development server, but when I publish the service to IIS, the following runtime error is thrown:

The underlying connection was closed: The connection was closed unexpectedly.\r\n   at System.Net.WebClient.OpenRead(Uri address)

As stated, the program opens the file without any problems when the service is hosted in the ASP.NET development server.  When hosted in IIS, an exception is thrown at the location specified above.  I thought that it might be an issue of security, so I went berserk in permission granting.  I sort of ruled that out at this point as every group has full access and the exception is still being thrown.

Any assistance on this would be greatly appreciated...


The underlying connection was closed: The connection was closed unexpectedly.

  

Hi,

This error stopping my work in my crucial time. The error is "The underlying connection was closed: The connection was closed unexpectedly.".

There are multiple WCF service I created in my project. But when I am requesting only one service this error is coming. I compare with other service, no difference. The service works fine in the morning, but afternoon it stops working and raising error.

I installed Silverlight 3.0 Tools for 2008 Sp1, Silverlight 3.0 Developer, WCF RIA Beta and Silverlight 4.0 runtime in my system in the morning. After getting this error I uninstalled WCF RIA Beta. But same issue.

Could not find any solution. Please assist me how to solve this issue.

Many Thanks, Kelvin.


The underlying connection was closed: The connection was closed unexpectedly.

  

 

hi all,

 

i am getting an error while returning data from WCF Service i am getting collection of workitem type bugs from tfs and with the help of WCF service i am exposing them to client. i have changed the maxmessage size, time out e.t.c.

 

but problem remains there. following is the error.

 

The underlying connection was closed: The connection was closed unexpectedly.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.

Source Error:

Line 141:        
Line 142:        public object[] fillRptBugs(string p, string s) {
Line 143:            return base.Channel.fillRptBugs(p, s);
Line 144:        }
Line 145:    }

Source File: c:\teamfoundationserverapplication\wcfservic

"The underlying connection was closed: The connection was closed unexpectedly." during WCF service c

  
Buddies,

I'm developing a WCF service (with Visual Studio 2008 SP1) and using a Console Application to test this service. My solution contains  the following project

A Console Application (to test the service)
A WCF Service Library  
A Bussines Class Library
And a WCF Service Application (to publish the service in IIS).

Everything is ok. The service is published and the client is able to consume the operations. But when I was testing the exception treatment some thing too weird is happing.

Take a look at the follow code parts and the comment on what is happen:

I start a common service call whit these statements (in cosole application):

ModeloVeiculoClient client = null;
try
{
    client = new ModeloVeiculoClient();
    ServiceResponse<List<Modelo>> sr = client.ObterTodos();<br/>    Console.WriteLine("Everything is fine!!");
}
catch(Exception ex)
{
    if (client.State != CommunicationState.Closed)
    {
        client.Abort();
        client.Close();
    }
}
ObterTodos() method of the client object is the service operation. W
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend