Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:58:00+00:00 2026-05-14T06:58:00+00:00

So I am writing a web application for use within my organization. The application

  • 0

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.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Here was my original code, which cause the access denied error:

dim urlToXml
urlToXml = "http://someserver/somesomeweb/nameofxml.xml"

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

dim xsl 
set xsl = Server.CreateObject("MSXML2.DOMDocument")
xsl.async = false
xsl.load(server.MapPath("somexsl.xsl"))

Response.Write( xmlDom.transformNode(xsl) )
xmlDom.save( server.MapPath("accounting/somexml.xml") )

Now, here is my new code thanks to thomask:

dim urlToXml
urlToXml = "http://someserver/somesomeweb/nameofxml.xml"

set http = CreateObject("MSXML2.ServerXMLHTTP.3.0")
http.Open "GET", urlToXml, false
http.Send()

dim xmlDom
set xmlDom = Server.CreateObject("MSXML2.DOMDocument")
xmlDom.loadXML( http.responseXML.xml )

dim xsl 
set xsl = Server.CreateObject("MSXML2.DOMDocument")
xsl.async = false
xsl.load(server.MapPath("somexsl.xsl"))

Response.Write( xmlDom.transformNode(xsl) )
xmlDom.save( server.MapPath("newxml.xml") )

Again thank you very much thomask.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:58:00+00:00Added an answer on May 14, 2026 at 6:58 am

    You might wanna look at MSXML2.ServerXMLHTTP(.3.0 – 6.0) to specify the user credentials. If the Content-Type is configured correctly, ServerXMLHTTP should give you the DOMDocument in the responseXml property.

    Dim http
    Set http = CreateObject("MSXML2.ServerXMLHTTP.3.0")
    
    http.Open("GET", "http://currentwebserver/currentsubweb/nameofxml.xml", false, "user", "pass")
    http.Send()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a web application in which i use several thirdy party commands calling
I am writing a web application that will allow a user to browse to
2 months ago I was writing a web-application which use some classes to draw
I'm writing a web application (PHP) for my friend and have decided to use
What's the best strategy to use when writing JMeters tests against a web application
I'm writing a web application that connects to a database. I'm currently using a
I am writing a web application that takes a script input from a client-side
I am writing a web application with Maven in the Eclipse IDE, and use
I am writing a web application in PHP that will store large numbers of
I'm writing a web application (in Python, not that it matters). One of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.