R – ASP.NET Webservice HTTP Redirect

asp.netredirectweb services

My website posts orders to partner sites using web services. Recently, one of our partners implemented load balancing on their servers and our web requests are failing because they get redirected to other URLs.

Normally when we test they pass because the URI is static but in production they fail because the requests get redirected.

e.g. redirecting from http://mysite.com/services/myservice.asmx to http://subnet.mysite.com/services/myservice.asmx

Any ideas?

Best Answer

Just make sure you set the AllowAutoRedirect property on the client to true.