rinkujain
asked on
The underlying connection was closed: An unexpected error occurred on a send
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?
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?
ASKER
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 ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.......
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.......
What are you using in the Windows application to access the page?
Bob
Bob
ASKER
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.
but i think may be they r using IE control or iframe sort of to access it.
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
Bob
ASKER
ok, i asked them , and come to know that they are using SOAP tool kit for that.
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
Bob
ASKER
its soap tookit ver 3.0
and for web page they are using IE control
and for web page they are using IE control
Is there any kind of proxy/firewall?
Bob
Bob
ASKER
yes proxy is there
Can you give me an example of how you are trying to access from Windows application? Are you using a WebProxy?
Bob
Bob
ASKER
in code we are not setting any proxy related information, while its in config file.where we define the port to use.
That is still not enough detail about what you are trying to do.
Bob
Bob
ASKER
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
-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
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
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
ASKER
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.
Hope now all scenario is clear to u.
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
Bob
ASKER
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.SoapC lient30")
Call soapClient.MSSoapInit(strC SBWSDL, strCSBService, strCSBSOAP)
soapClient.ConnectorProper ty("Timeou t") = 0
intCSStatus = soapClient.GetCreditDecisi onXML(strC reditDecis ion)
End if
-------------------------- ---------- ---------- ---------- ---------
Calling webpage from VB app:
-------------------------- ---------- ---------- ---------- --------
Screen.MousePointer = vbHourglass
With Wb1
.Navigate2 strURL
End With
Screen.MousePointer = vbDefault
-------------------------- ---------- ---------
is the picture clear now?
--------------------------
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.SoapC
Call soapClient.MSSoapInit(strC
soapClient.ConnectorProper
intCSStatus = soapClient.GetCreditDecisi
End if
--------------------------
Calling webpage from VB app:
--------------------------
Screen.MousePointer = vbHourglass
With Wb1
.Navigate2 strURL
End With
Screen.MousePointer = vbDefault
--------------------------
is the picture clear now?
Have you looked into adding a web reference to the web service, and use the SOAP methods that come with web services?
Bob
Bob
ASKER
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....
ASKER
But we are in .net, so we can test only that vb application is of diff company, they are just using our application
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.GetCreditDecisionX ML()
Bob
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.GetCreditDecisionX
Bob
ASKER
I am doing in this way only, not getting you what u wanna say ?
That was only an example of creating a reference to a web service. How are you doing it?
Bob
Bob
ASKER
yes in the same way, but we are also applying TimeOut property of webservice object.
I still haven't seen anything that would explain your problems.
Bob
Bob
ASKER
thnx Bob that atleast u tried and spend a good amount of time with me to figure out the problem.
http://weblogs.asp.net/jan/archive/2004/01/28/63771.aspx
http://p2p.wrox.com/topic.asp?TOPIC_ID=4858
http://www.mcse.ms/message1211838.html