locked
Urgent : The underlying connection was closed: An unexpected error occurred on a send RRS feed

  • Question

  • Hi,

    I am calling a web service which is hosted on another server, previously our code is hosted on Windows 2000 server, and the development is also done in Win 2k server using VS 2005 .NET 2.0.

    Now as we are upgrading our server to Win 2003, when I migrate our code for calling web service, it is throwing below error

    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Vin.VINResolution.VinResolution(VinReq VinReq) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\insurance_polkwscall\f1e2ec58\6f46e676\App_WebReferences.cdzfrtmu.0.cs:line 49 at ASP.default_aspx.CallVinVerification() in C:\Inetpub\TFSDD\TFSCont\insurance\polkwscall\Default.aspx:line 159
    The underlying connection was closed: An unexpected error occurred on a send

    I am not sure what is the problem, but same code is running perfectly in windows 2000 server.but throwing error in Windows 2003 server.

    Any help is really appreciate.


    Thanks in advance, ----------------------------- Israq Khan

    Wednesday, May 16, 2012 3:49 AM

Answers

  • I figured out the solution to my problem.

    In the code I have just added below line and it works like charm for me

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3

    Thanks a lot for replies


    Thanks in advance, ----------------------------- Israq Khan

    • Marked as answer by Israq Khan Friday, May 18, 2012 3:06 AM
    Friday, May 18, 2012 3:05 AM

All replies

  • The error could be caused by a number of different problems.  the server may not be running a service, a friwalll could be blocking the messages, the IP addresses have changed, or the file permissions may not be set correctly on the server.

    It appears from the error message that the WebRequest net library is being used and that the programmed failed when a connection was attepted to be made from the client to the server.

    How are you installing the program on the server.  Are you running a setup.exe to perform the installation?  The new server may not have the same libraries installed as the old server.  Running the setup.exe that was built with the appliciation will install the same libraries that was used to build the software.


    jdweng

    Wednesday, May 16, 2012 9:29 AM
  • I figured out the solution to my problem.

    In the code I have just added below line and it works like charm for me

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3

    Thanks a lot for replies


    Thanks in advance, ----------------------------- Israq Khan

    • Marked as answer by Israq Khan Friday, May 18, 2012 3:06 AM
    Friday, May 18, 2012 3:05 AM