3

I am unable to load an xml file in javascript (using the same code as here) when running the site under the VS Development Server. It works when running under IIS. I know that IIS displays static content without authorization by default and DevServer does not. I've tried putting the file in different places under the web app project (a custom Common directory, App_Data, the root) without success.

The error gets caught by the Application_Error method in global.asax and it says

"System.Web.HttpException (0x80004005): Path 'foo.xml' is forbidden." 

However, the ajax call does not crash and when done using a different piece of code (the jQuery.ajax() method) the ajax call is always succesfull and never goes into the error callback I provide.

The script is called from a script block on an aspx page.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.