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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

.NET Framework 4.0 error - The underlying connection was closed: An unexpected error occurred on a s

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

Hello,

I'm receiving the following error occasionally when calling web service using a .NET 4.0 web application. 

"The underlying connection was closed: An unexpected error occurred on a send."

All of the articles I've read regarding this issue are for the Framework 1.1.

Is there any solution to this issue for using .NET framework 4.0?

Thanks in advance.




View Complete Post


More Related Resource Links

The underlying connection was closed: An unexpected error occurred on a send.

  

I am consuming a third party web service wsdl using my .net aps.net page. And I am getting following error message. Cannt get to resolve it. Its working on my machine but not in my development machine. I have installed the certificate also in certificates on that machine. Can somone please help.?

Error -->  The underlying connection was closed: An unexpected error occurred on a send.

 

 

 

 


System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a rec

  
Hello Guys,         I am getting following exception while web service (ASMX) is returning the response. <!-- [if gte mso 10]> <mce:style> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.     <!-- [if gte mso 10]> <mce:style>                                                     InnterException (System.IO.Exception): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."       I think either the Asp.net web server is closing the connection or the response is too long.   Following is my simple code.    1)   namespace JFA.IndiePay.BusinessAccess { public class VerTexProcessor { public DataSet ProcessVerTexForBatch(DataSet dsInputRequest) { DataSet dsResponse = new DataSet(); //Call vertex web service here. VertexService.Service texCalculator = new VertexService.Service(); texCalculator.Timeout = 500000;

The underlying connection was closed: An unexpected error occurred on a receive

  
Hi All,   i have developed a web application to call WCF service (which is hosted in IIS) from client application using .Net 1.1 it works fine.   but i got an error "The underlying connection was closed: An unexpected error occurred on a receive." when the return object is getting complex.   i analysis the issue with different level of object complexity and i found it get failed for following structure.   eg:   ObjectA - outer object that has some primitive data types and the list of ObjectB ObjectB - this also contain some primitive data and list of ObjectC.   Hope you can understand the hierarchy (complexity) of the return object. This works up to 2nd level of object hierarchy.   Does anyone have idea about the solution for this exception?   Thanks in Advance Shazvi

The underlying connection was closed: An unexpected error occurred on a receive.

  

Hello I am getting this when I call webservice using HttpWebRequest. It works fine while working with local webservice. I get this error when webservice path is changed from local to dev environment.

I had put the trace on webservice. Webservice worked well.

Thanks

dipz

 


The underlying connection was closed: An unexpected error occurred on a receive

  

Hello,

I calling webservice using HttpWebRequest in separate thread. when I try to get the response using oRequest.GetResponse(), I am getting this error "The underlying connection was closed: An unexpected error occurred on a receive".
If I call the webservice in the main thread, it works fine. Please suggest a way to overcome this. I need to use threading to store data returning from webservice in custom cache.

Thanks and Regards
dipali

 

 


The underlying connection was closed: An unexpected error occurred on a receive?

  

Hi,


I m trying to call web service on another server but getting this error:

The underlying connection was closed: An unexpected error occurred on a receive


How can i get rid of this error?

Thanks in Advance


Best Regards


Opening an ASP.NET page in JS pop up error - The underlying connection was closed: An unexpected err

  

Hello there,

I was required to show a page content (HTML form) in a java script popup window. The application is built on ASP.NET technology. Since the content to show is dynamic i.e.it is decided at run time what to show. So I used HttpWebRequest/HttpWebResponse classes to get the HTML content that is to show in the JS Pop Up window.The resulting response string is displayed with the use of PlaceHolder control.

Before load balancing, it was runing perfectly. But the implementation ofthe load balancing, it starts throwing error. The error is as follows:

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.HttpWebRequest.GetResponse()

I have replaced the HttpWebRequest/HttpWebResponse classes with System.Web.WebClient but it is still throwing the same error.

Please help.




Wsdl genereated proxy getting error "The underlying connection was closed: An unexpected error occur

  

Created a server interface proxy with wsdl.exe and added the /ServiceInterface attribute.  When consuming the web service on the development machine I receive this error, "The underlying connection was closed: An unexpected error occurred on a receive"

 


Pat Luciano

Framework 2.0 changes - TCP Provider, error: 0 - An existing connection was forcibly closed by the r

  
If you connect to a server and open a query in SQL Managment studio (2005) and looses connection and then regain the connection, when you try to run the query it gives me a "TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host."
 
This happens against both 2005 and 2000 servers.
 
If I re-run the query it works.
 
However, this happens in our VB.NET app as well for clients with Wireless connections.
 
So, something has changed in Framework 2.0 regarding this, does anyone know how to tell the client to not throw this error and just try connecting the server instead which will work?
 

SP2010 InfoPath error: The underlying connection was closed: Could not establish trust relationship

  

Site: https://sp.xxxx.com/TestSite

When the InfoPath form is loading, I get the following error:

An error occurred querying a data source.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

An entry has been added to the Windows event log of the server.

Log ID:5566

SOAP WebService Call error: The underlying connection was closed: A connection that was expected to

  

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server..

 

We are trying to export some xml data to the client server using their web service, but we are receiving following exception

In some scenario when the connection take more than some expected time.

 

"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.."

 

ASMX ws: An unexpected error occurred on a receive; failing intermittently

  

Hi,

we I have asmx web service, this seems to be working fine for 25 client machines but one site keeps failing. The client gets a small dataset and tries to send it across to server to process. The dataset saved in XML file only makes 450 - 550kB. The web service is contacted twice in a short time every half an hour. The other smaller dataset (50kB) goes across everytime without any troubles. This site is not trying to send the biggest dataset, other site are sending much bigger datasets without problem. The catch is this failing site keeps retrying for 20 times (10 hours) in average and then eventually goes across. I don't think the service webmethod is erroring out as that is all wrapped up in the try and catch and the exception is not getting thrown, also every other try for the exact same webmethod used by any other client site seems to be working fine.

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Ne

'An unexpected error has occurred' on upload after changing limit

  

Hi,

I recently changed the max upload size for attachments to TFS work items on our SharePoint site.  I did this by going to the http://tfsserver1:8080/tfs/ProductCollection/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize URL and entering the new size in bytes.

This worked a treat, but not I cannot upload any documents to another site on the same server.

I can open and save documents that are already there, but when I click the 'Upload' button it gives a white page with 'An unexpected error has occurred.' on it.

Is there something else I have to set when I increase the upload limit for work items?

Regards,
Isobel


A connection was successfully established with the server, but then an error occurred during the pre

  
One of our IIS App pools serving a SharePoint site on one of the  Web Front End  went down suddenly at around 1pm today. Not entirely sure if  it's related yet or how, but we see a bunch of SQL errors from the Web server around that time as follows..    Event Type:         Error Event Source:     Windows SharePoint Services 3 Event Category:                Database Event ID:              5586 Date:                     8/24/2010 Time:                     12:57:21 AM User:                     N/A Computer:          xxxxx Description: Unknown SQL Exception -2146893056 occured. Additional error information from SQL Server is included below.   A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error

Integrated SSRS and kerberos working great.But one user gets An unexpected error occurred while conn

  
I have this one user who can access SharePoint with no problems otherwise but is getting errorAn unexpected error occurred while connecting to the report server When they try to access an SSRS reports I confirmed he has access. Client issue? AD Account issue?Thanks.

A network-related or instance-specific error occurred while establishing a connection to SQL Server.

  
I know what the problem is. I am just not sure how to fix it. I get the error below when I have this: < roleManager enabled="true" />  It works fine when I set rolemanager = false but I need to use membership roles.   my connection strings are:  <connectionStrings> <add name="ConnMSSQLASP" connectionString="Data Source=MISFS;Initial Catalog=ASPNetDB;User Id=----;Password=-----;" providerName="System.Data.SqlClient"/> <add name="DisasterRecoveryConnectionString" connectionString="Data Source=MISFS;Initial Catalog=ASPNetDB;User Id=----;Password=----" providerName="System.Data.SqlClient"/> </connectionStrings>    Can someone help me with this? ERROR Below: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 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. SQLExpress database file auto-creation error: The connection string s

network - related or instance-specific error occurred while establishing a connection to sql server

  
A co worker tried installing sql2008 express on his home laptop and had a problem, i downloaded the install and installed again (didnt remove orig install ( prob should have))  now when i try to connect using Server type : Database Engine  Server name : . or .\SqlExpress with window auth i get the message:Cannot connect to ..Additional Info : A network - related or instance-specific error occurred while establishing a connection to sql server
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