Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2006-07-19
30
572 Views
Last Modified: 2008-01-09
Hi,
 I am working on Asp.net application, which has webservice layer and buisness layer, in its BL we are calling 3rd party webservice, but many time we got this error.
We try to solve it by setting ScriptTimeout( at webservice) and Timeout (of Proxy) properties.
We try it with KeepAlive property(but someetimes it creates problem at window application)
so i don't know which approach i should proceed?
0
Comment
Question by:rinkujain
  • 15
  • 13
30 Comments
 
LVL 7

Expert Comment

by:pradeepsudharsan
ID: 17136725
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17137378
Thnx pradeepsudharsan to reply on these, actully we have tried with keepalive thing(as in all links given by you talked about that), but its not solving our purpose, so is there is any other proxy setting or dependency, which we need to take care of ?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 250 total points
ID: 17138145
1) Where is the problem?

2) Have you talked to the 3rd party web service people about the possibility that this error is coming from them?

Bob
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Author Comment

by:rinkujain
ID: 17144263
Problem is coming when we are dealing with 3rd party web service.

Actually we are having scenario like this:

our application used by 2 application:
1 Siebel (web application)
2 LeadTrac (Window Based application , in VB)

now KEEPALIVE thing working fine for Siebel, but for window application sometimes it works abnormally, and so we have to comment that one.

that means we wanna work around for this problem for window app as well as web application.

Hope now its clear.......
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17160493
What are you using in the Windows application to access the page?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17165727
We have not developed that , its another company project, and they are using our pages from there,
but i think may be they r using IE control or iframe sort of to access it.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17166630
It is important to understand how the pages are being accessed and how the web site is interacting with the web service and where the bottlenecks are.  Without that knowledge, it is very difficult (if not impossible) to find a solution.

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17167197
ok, i asked them , and come to know that they are using SOAP tool kit for that.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17168747
Well, that starts to answer the question, but not nearly enough detail.  What SOAP tool kit version?  Is this an ASP.NET web service?  Calling web services from a Windows application usually should be just the same as from a web application, but doesn't take into account special environments.

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17168904
its soap tookit ver 3.0
and for web page they are using IE control
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17168943
Is there any kind of proxy/firewall?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17173694
yes proxy is there
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17174763
Can you give me an example of how you are trying to access from Windows application?  Are you using a WebProxy?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17174780
in code we are  not setting any proxy related information, while its in config file.where we define the port to use.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17174824
That is still not enough detail about what you are trying to do.

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17176305
Ok i am expaining the scenario :
-our is a web application
-when Windows Authentication is unchecked and keepalive property set at proxy class , then it was working fine.

-when Windows Authentication is checked and keepalive property set at proxy class , then it was working fine.
 But then it was giving problem sometime for page rendering.

-so we removed keepalive setting for Windows Authentication is checked and set the timeout value to -1, but then it is giving problem od Connection Closed sometimes.

Thanks
Rinku
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17176939
Rinku,

Are you creating an instance of the web service in the Windows application?  How are you doing that?  How are you calling the web service methods?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17181910
yes, as that application calling our pages too, and in the page we are creating instance of web service. and if they wanna use web service directly then they use it thru Soap toolkit.

Hope now all scenario is clear to u.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17183426
Clear as mud (if you understand that American expression).  You have not explained anything that would help me help you with this fairly complex problem.

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17183858
Calling web service from VB app:
------------------------------------------------------------
Call GetIniValue("CSB", "CSB_WSDL", strCSBWSDL)
Call GetIniValue("CSB", "CSB_Service", strCSBService)
Call GetIniValue("CSB", "CSB_SOAP", strCSBSOAP)

If strCSBWSDL = "" Or strCSBService = "" Or strCSBSOAP = "" Then
   MsgBox "Error occured during processing. " & vbNewLine & "Please contact system administrator."
Else
    Set soapClient = CreateObject("MSSOAP.SoapClient30")
    Call soapClient.MSSoapInit(strCSBWSDL, strCSBService, strCSBSOAP)
    soapClient.ConnectorProperty("Timeout") = 0
    intCSStatus = soapClient.GetCreditDecisionXML(strCreditDecision)
End if
-----------------------------------------------------------------

Calling webpage from VB app:
----------------------------------------------------------------


   Screen.MousePointer = vbHourglass
    With Wb1
        .Navigate2 strURL
    End With
    Screen.MousePointer = vbDefault


---------------------------------------------
is the picture clear now?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17186229
Have you looked into adding a web reference to the web service, and use the SOAP methods that come with web services?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17190337
not getting you, if you are talking abt whether we have used web methods in local env, then yes our all pages dealt with web service only, its working fine here....
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17190348
But we are in .net, so we can test only that vb application is of diff company, they are just using our application
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17191163
Ok, let's try this:

1) Add a web reference, pointing to the URL for the web service
2) Create an instance of the web service

   Dim service As ExampleWebService.Service

3) Call a web method:

   Dim creditXml As String = service.GetCreditDecisionXML()

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17231936
I am doing in this way only, not getting you what u wanna say ?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17232620
That was only an example of creating a reference to a web service.  How are you doing it?

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17232650
yes in the same way, but we are also applying TimeOut property of webservice object.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17232701
I still haven't seen anything that would explain your problems.

Bob
0
 
LVL 3

Author Comment

by:rinkujain
ID: 17387342
thnx Bob that atleast u tried and spend a good amount of time with me to figure out the problem.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question