I cannot seem to load an XML document using ASP (Classic), IIS6. Details inside.

Posted by carny666 on Stack Overflow See other posts from Stack Overflow or by carny666
Published on 2010-04-13T16:57:04Z Indexed on 2010/04/14 22:43 UTC
Read the original article Hit count: 196

So I am writing a web application for use within my organization. The application requires that it know who the current user is. This is done by calling the Request.ServerVariables("AUTH_USER") function, which works great as long as 'Anonymous Access' is disabled (unchecked) and 'Integrated Windows Authentication' is enabled (checked) within IIS for this subweb.

Unfortunately by doing this I get an 'Access Denied' error when I hit the load method of the XML DOM.

Example code:

dim urlToXmlFile
urlToXmlFile = "http://currentwebserver/currentsubweb/nameofxml.xml"

dim xmlDom
set xmlDom = Server.CreateObject("MSXML2.DOMDocument")

xmlDom.async = false
xmlDom.load( urlToXmlFile ) ' <-- this is where I get the error!

I've looked everywhere and cannot find a solution. I should be able to load an XML file into the DOM regardless of the authentication method.

Any help would be appreciated. So far the only two solutions I can come up with are:

a) create a new subweb that JUST gets the current user name and somehow passes it back to my XML reading subweb.

b) open up security on the entire system to 'Everyone', which works but our IS department wouldn't care for that.

© Stack Overflow or respective owner

Related posts about asp-classic

Related posts about iis6