Will somebody please put me out of my misery. I think this might be a common problem, but I've spent 30mins searching the forum and I can't find a solution...
I have forms-authenticated web app with a page that makes AJAX client-side calls to a web-service that is part of the same application and hence (I assume) is protected by the forms authentication. The problem occurs when the forms authentication ticket has expired. If a user action invokes a call to the web-service they get a message box quoting InvalidOperationException and Authentication Failed etc. I want to try and intercept this exception and re-direct to the login page as usual. I can't see how to do this. I've tried adding a <location> tag to the web.config to exclude the web-service asmx file from the authorisation, but this doesn't work.
The HTTP logs show a 500 internal server error along with this message:
"@_Error(false,"Authentication failed.",null,"System.Invalid ...
Go to the complete details ...