开发者

Cookieless = Autodetect Web Services problem brings errors on call

开发者 https://www.devze.com 2023-03-17 23:04 出处:网络
Having a Simple \"Hello World\" web service on a web application that 开发者_如何转开发has cookieless= AutoDetect. I cannot call the web service without an error. If the cookieless is set to False or

Having a Simple "Hello World" web service on a web application that 开发者_如何转开发has cookieless= AutoDetect. I cannot call the web service without an error. If the cookieless is set to False or True then everything is ok. Thanks in advance.


The cookieless=AutoDetect feature works by sending redirects (302 or 403 IIRC) to the browser in order to detect whether cookies are supported.

It then plants the various required Id's in the URL rather than using cookies if the support isn't there.

Make sure the method you are testing the web service with supports these redirects and the checks they make for cookies.

If you're testing the web service in Visual Studio using the Add Web Reference option, then VS has known problems with the redirects which can muddy the waters.

In that case try modifying your reference to configure support for automatic cookie detection:

http://<host>/<app>/<webservice>.asmx?wsdl&AspxAutoDetectCookieSupport=1


Solution is here http://dougrees.blogspot.com/2008/07/using-autodetect-cookieless-sessions.html Thanks to all above comments.

0

精彩评论

暂无评论...
验证码 换一张
取 消