Tuesday, July 28, 2009

64 THE SPECIFIED NETWORK NAME IS NO LONGER AVAILABLE

So I've been working on a HTTP client for my company, replacing WinInet with WinHTTP because basically WinInet sucks. There is one link on the MSDN for porting applications across but it doesn't go into as much detail as I'd like so that the above error can be avoided. The above error is actually from the ISA Server logs, but what you see in the application is the WinHttpRecieveRequest() waits for the timeout and never gets the expected reply from our HTTP server.

Now I know the client works because when I disengage the proxy settings, everything works as expected. So why doesn't it work when going through the proxy? Read this, Well it seems that ISA Server reads all the packets going through it and if it determines that a packet is malformed/corrupted then it will simply drop that packet and so your transmission is dead with no notification.

Once I knew this it was a simply matter of determining what the ISA Server was flagging the packet as being corrupt for. In my case it was a simple matter of comparing HTTP packets from before with post upgrade work and it seems that the WinHttpSendRequest() was adding a bad 'Content-length' value to the packet. Hope this helps someone, it was a solid week of research for me to track this down.

No comments:

Post a Comment