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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

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

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

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.






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

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

  

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.


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

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


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.."

 

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?

JDBC connection to SQLserver failing with ERROR [JDBCExceptionReporter] The connection is closed.

  
SQL server version: MS 2005 9.00.3050.00 Std edition Development version is on a stand alone server. Production is on an active/active cluster. Full error message below. There is an explanation and solution as noted below. However we do not see this issue in all our environments. Can anyone tell me why we see this issue in our production environment but not on our development environment, especially as the issue seems to arise following low usage times. Explanation / Solution If you are using the v1.2 driver, and you can positively rule out transient network connectivity issues and multithreaded usage, the next most common cause I am aware of is where a connection pool is being used and the pooling manager (e.g. DBCP or C3PO) does not test pooled connections for validity before handing them out to the app. What happens in this case is connections that sit idle in the pool for a very long time get closed by the TCP/IP stack, routing hardware, etc. Then they're already dead when the pooling manager hands them out. The solution is to configure the pooling manager to validate connections before handing them out, typically using a validation query like "SELECT 1". Error Message INFO | jvm 1 | 2010/09/07 07:52:11 | [09.07 07:52:11.396] LOG ERROR BROKO-EY-TBF-REDUCED-ENV-DP> INFO | jvm 1 | 2010/09/07 07:52:11 | - broko.quark.QueueMonitorThread.getNextCommand(QueueM

"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

WCF Service fails with Unexpected connection closed with large amount of data

  
Good day all,   I'm sure this question is relatively simple, but I'm quite new to WCF (been on a Java project the last few years and it's nice to be back in MS territory even if a lot has changed!).   Anyway, here's all the details of my scenario I was hoping someone could shed some light on.   1)  This WCF service is hosted as a webservice and is being testing in the WCF Test Tool. 2)  There is a method call on the service that, while rarely used, can return a fair amount of data (over 20,000 objects) - this is a requirement of the system 3)  The object that is being serialized has the following signature/contract (property changed for example): [DataContract] public class Foo { private string prop1; [DataMember] public string Prop1 { get { return prop1; } set { prop1= value; } } private string prop2; [DataMember] public string Prop2 { get { return prop2; } set { prop2= value; } } private string prop3; [DataMember] public string Prop3 { get { return prop3; } set { prop3= value; } } private string Prop4; [DataMember] public string FaaCode { get { return prop4; } set { prop4= value; } } private string prop5; [DataMember] public string Prop5 { get { return prop5; } set { prop5= value

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?
 

Getting connection error to a database when page loads...occasionally...

  

So occasionally after a run to the database I am getting the following error;


A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)

It always happens after this query is executed during a page Load:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        myconnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True")
        myda = New SqlDataAdapter("Select * from diaryDates", myconnection)
        myda.Fill(ds, "diaryDates")
    End Sub


What does the error mean and how can I resolve it ?


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

  

I've gone through lot of articles and not one solution worked for me:

I'm having IIS 7 on Windows 2k8 with SSRS 2008.

How SSL is configured: Its configured to access SSL over existing web-site. final url looks like https://url/reports. When I enter this URL I get the error message.

But, if I connect to same site using non SSL website from my local machine, it works fine. For example, if i use VS 2008 web server and connect to it, it works and shows me report, but as soon as I deploy it on webserver having SSL enabled, it just throws this message.

 

Somebody please help me wid this one


Not so important
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