Unable to load xml file in javascript running site under Development Server

235 Views Asked by At

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

There are 0 best solutions below