I have a webservice (asmx file) in a directory requiring form authentication
When I try to add the WebReference through VS2005 – I get the following error:
The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href='/webchat/login.aspx?ReturnUrl=%2fwebchat%WebService.asmx'>here</a>.</h2> </body></html>
When I remove the web.config in that directory (and basically removing the requirement for form authentication) everything works fine. I can add the WebReference.
Any idea?
Place the following code in your web.config:
ASP.Net allows to override application-wide settings for specific locations.