|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Connectiing to WebService problemMy VB.Net (1.1) application connects to ASP.Net (1.1) WebService that resides on ISP Server. My client successfully runs this application from 4 out of their 5 PCs. On that one PC I receive the following error whenever I call a method of the service: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. The procedure that fails is as follows: Public Shared Function GetService() As MyService.MyService Dim ws As MyService.MyService = New MyService.MyService With ws .CookieContainer = New CookieContainer .Proxy = New System.Net.WebProxy Dim cr As CredentialCache = New CredentialCache .Proxy.Credentials = cr.DefaultCredentials ' The following call fails .Authenticate(UserName, Password) End With Return ws End Function Any ideas why would the same code not work on one PC only - what I should be looking for to rectify the error? Any help is greatly appreciated - the client wants me to have it fixed before the New Year... Try Fiddler to watch the HTTP connections when working and not:
http://www.fiddlertool.com/fiddler/ This will give you a place to look for what is going on. Watch the user that is connecting, as well as the actual request. It is also possible that Internet Explorer is set up differently on this box. The settings in IE cascade through the entire HTTP stack in some places and can cause issues. That would be another place to look. If you client has a proxy the "Bypass proxy for local connections" should be checked for a web service on the internal network. -- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "Sergey Poberezovskiy" wrote: > Hi, > > My VB.Net (1.1) application connects to ASP.Net (1.1) WebService that > resides on ISP Server. My client successfully runs this application from 4 > out of their 5 PCs. On that one PC I receive the following error whenever I > call a > method of the service: > > System.Net.WebException: The underlying connection was closed: An unexpected > error occurred on a send. > > The procedure that fails is as follows: > > Public Shared Function GetService() As MyService.MyService > Dim ws As MyService.MyService = New MyService.MyService > With ws > .CookieContainer = New CookieContainer > .Proxy = New System.Net.WebProxy > Dim cr As CredentialCache = New CredentialCache > .Proxy.Credentials = cr.DefaultCredentials > ' The following call fails > .Authenticate(UserName, Password) > End With > Return ws > End Function > > Any ideas why would the same code not work on one PC only - what I should > be looking for to rectify the error? > > Any help is greatly appreciated - the client wants me to have it fixed > before the New Year... > Gregory,
1. Not sure how to set up the fiddler to "listen" to web service requests from .Net applications - saw similar cry from their website's discussions with no answer... 2. Tried to replicate the request directly from the fiddler - works like a charm on other computers, but returns Result: 0 and Session State: Aborted on the one with the problem - and no Response. Not sure how I can use this information... 3. IE seems to have pretty much the same settings - as far as I know, they are standard within the organization, and have not been modified since... 4. Web service is on the Internet - do not think that "Bypass proxy for local connections" could have anything to do with that... Any help?... Show quote "Cowboy (Gregory A. Beamer) - MVP" wrote: > Try Fiddler to watch the HTTP connections when working and not: > http://www.fiddlertool.com/fiddler/ > > This will give you a place to look for what is going on. Watch the user that > is connecting, as well as the actual request. > > It is also possible that Internet Explorer is set up differently on this > box. The settings in IE cascade through the entire HTTP stack in some places > and can cause issues. That would be another place to look. > > If you client has a proxy the "Bypass proxy for local connections" should be > checked for a web service on the internal network. > > -- > Gregory A. Beamer > MVP; MCP: +I, SE, SD, DBA > > *************************** > Think Outside the Box! > *************************** > > > "Sergey Poberezovskiy" wrote: > > > Hi, > > > > My VB.Net (1.1) application connects to ASP.Net (1.1) WebService that > > resides on ISP Server. My client successfully runs this application from 4 > > out of their 5 PCs. On that one PC I receive the following error whenever I > > call a > > method of the service: > > > > System.Net.WebException: The underlying connection was closed: An unexpected > > error occurred on a send. > > > > The procedure that fails is as follows: > > > > Public Shared Function GetService() As MyService.MyService > > Dim ws As MyService.MyService = New MyService.MyService > > With ws > > .CookieContainer = New CookieContainer > > .Proxy = New System.Net.WebProxy > > Dim cr As CredentialCache = New CredentialCache > > .Proxy.Credentials = cr.DefaultCredentials > > ' The following call fails > > .Authenticate(UserName, Password) > > End With > > Return ws > > End Function > > > > Any ideas why would the same code not work on one PC only - what I should > > be looking for to rectify the error? > > > > Any help is greatly appreciated - the client wants me to have it fixed > > before the New Year... > > |
|||||||||||||||||||||||