Hi Guys
I have a VB program, lets call it AddressSearch. I have access to a 3rd party web service. I send the web service a post code, and it returns a list of valid addresses. Until recently.
Code hasn't changed, and (as far as we know) the web service hasn't been changed (do I trust the vendor?), and (as far as I know) the web proxy server hasn't been changed (do I trust my hardware manager?).
And yet when I send a valid post code from AddressSearch to the web service through the web proxy server I get the following Error Message:
System.Net.WebException: The request failed with HTTP status 417: Expectation.
If I go to the web service through my web browser (IE), through the web proxy, I get a valid list of addresses ... expected.
The VB.Net code used to get the default web proxy and default credentials (from Internet Options/Connections/LAN Settings I understand) is:
If ws.Proxy Is Nothing Then
ws.Proxy = WebRequest.DefaultWebProxy
ws.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
End If
where "ws" is a reference to the web service.
If I go back into Internet Options and turn off the "Use automatic configuration script", then run the same tests again, I get the following:
Send a valid post code from AddressSearch to the web service, I get back a valid list of addresses. Great!
Send an invalid post code to the web service through the web proxy server I get the following Error Message:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
Through a web browser, I get a valid list of addresses.
So at first I was going to yell at the vendor, but I get a valid response from the web service via IE going through the web proxy.
Then I was going to kick the hardware manager, but again if I get a valid response from the web service via IE going through the web proxy, the web proxy isn't to blame.
I can't kick myself (just yet) as the code hasn't been altered for months.
Does it matter that my users use the AddressSearch through a terminal server session?
So now I am confused, and I need your help.
Thanks for reading!!
Simon