The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

ASP, MSXML2.ServerXMLHTTP and authentication

My company is using a web hosting company to host the company’s website. We are provided a dev environment and a production environment.
The dev box is win 2000 server. The production box is win 2003 or 2008 server, I can’t remember. I also have a dev box in my office running windows 7 and IIS. The web hosting company provides a web page to replicate content from dev to prod. The page provides the status of replication. In order to update the status, I need to reload the page. Who wants to press F5 for 8 to 15 minutes? Not me. To get around this, I created a page that uses MSXML2.ServerXMLHTTP.4.0 to load the page, and indicate the status. I then added this page to an iframe and used javascript to reload the iframe on a constant basis until the status = “complete”. I’ve been running the code on the development box and all is good. The other day, I tried running the code on the production server and got an error message:

msxml4.dll error '80072efd'
A connection with the server could not be established

I looked into this and found out that Microsoft is no longer supporting xml parser 4. I’m now rewriting the page to work with xml parser 6.
Here is the original code that used to work in dev and prod:

I’ve tried rewriting the code and it’s working in dev environment, but not in prod. In prod, the code returns a HTTP 401.1 - Unauthorized: Logon Failed. Now before you tell me to simply run the page on the dev box, let me explain why I am switching to prod:
1. My site uses a database to allow or hide site features.
2. Features are being reviewed on the dev box before they are released into production.
3. I need to push the site to production while features are being reviewed and I don’t want to turn off the features in dev while the site replicates and turn them back on afterwards. (requires pre replication and post replication action pages)
4. I can setup a page to run on the prod box after replication finishes, to turn on or off approved features. (post replication action page)
5. I can’t get the ASP code running on the Dev box to modify the DB on the production server for obvious security reasons.

This is why I want to run the replication page on the production server. Load replication page, refresh status till complete and then run some post replication code to hide unapproved features.