Adding web reference problem because of autodetectcookiesupport
-
I have a web service in my site, i have session statemanagement to autodetect wheter or not the browser has cookies enabled
<sessionState mode="SQLServer" timeout="30" cookieless="AutoDetect" </sessionState>
When i try to add the web reference i get an error: There was an error downloading 'http://localhost/V01/WebService.asmx?op=PedidosNuevos'. The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/V01/WebService.asmx?op=PedidosNuevos&AspxAutoDetectCookieSupport=1">here</a>.</h2> </body></html> In the add webreferece dialog, i can call the web method, i also called it from ie and it works as expected, the only problem is that i cant add it to my project as a web reference I think it must be because of the redirection to detect if cookies are enabled How can i add it?? Thanks for any help
Alexei Rodriguez
-
I have a web service in my site, i have session statemanagement to autodetect wheter or not the browser has cookies enabled
<sessionState mode="SQLServer" timeout="30" cookieless="AutoDetect" </sessionState>
When i try to add the web reference i get an error: There was an error downloading 'http://localhost/V01/WebService.asmx?op=PedidosNuevos'. The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/V01/WebService.asmx?op=PedidosNuevos&AspxAutoDetectCookieSupport=1">here</a>.</h2> </body></html> In the add webreferece dialog, i can call the web method, i also called it from ie and it works as expected, the only problem is that i cant add it to my project as a web reference I think it must be because of the redirection to detect if cookies are enabled How can i add it?? Thanks for any help
Alexei Rodriguez
-
I had the same issue; The only way to solve it was to set cookieless="False" in order to add the web reference then set it back to AutoDetect. If you find a better solution, please let me know!
Yes, i remember that problem, long time ago. I had to add to reference as follows: http://servername/WebService.asmx?WSDL&AspxAutoDetectCookieSupport=1 And i dont remember the reason why, but in my code behind in the load event i have this code: Me.webservice.Url &= "?AspxAutoDetectCookieSupport=1" In case you get an error add this part
Alexei Rodriguez