I created a webservice on my local machine and connect to it with localhost. The webservice works great when I access it via IE and I am able to do all the functions created with no problem. When I create a script to access the webservice via powershell I get the following error. If I access an outside webservice like get teh weather powershell works just fine.
$proxy2 = New-WebServiceProxy -Uri 'http://localhost/API/webservice.asmx?WSDL'
[xml]$Response = $proxy2.GetStatus()
I have done an extensive search to try to shed some light on what the issue is and have not come up with anything usable
Any help you can give is greatly appreciated.
It doesn't seem anyone has any ideas on this one... But it's possible the browser is doing something you aren't seeing. Have you used something like Fiddler to see what the exact browser activity is?
Your web server seems to be configured strangely. If you look at the URL of the "Object moved HERE" text, you see it is trying to redirect you to API/webservice.asmx?AspxAutoDetectCookieSupport=1. That seems strange, since a web service shouldn't need cookies, unless your service needs them. IE probably handles this because its a full-blown browser with cookie support. I would guess Invoke-WebRequest doesn't work that way.
You must be logged in to reply to this topic.