Request.ServerVariables APPL_PHYSICAL_PATH returning wrong directory - suspicion it is METABASE PATH problem

Hi,

I'm completely lost with this problem. We've changed servers so that a webstie we've moved to IIS 6.0 that was on IIS 4.0 is in a different directory structure on the new computer.

On the old computer the directory was on the D: drive and on the new computer with IIS 6.0 the directory is on the C: drive. Here is the error message I'm getting:

********************

Microsoft JET Database Engine error '80004005'

'D:\Inetpub\wwwroot\lawsuit-free\MemberArea\Misc\MemberArea\Misc\Login.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

D:\INETPUB\WWWROOT\LAWSUIT-FREE\MEMBERAREA\MISC\../LFInclude.asp, line 6

********************

Here is the code in LFInclude.asp on line 6

********************

<!-- METADATA TYPE="typelib"
              FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
  Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source= " + Request.ServerVariables("APPL_PHYSICAL_PATH") +"\Login.mdb"

  Dim objConnInv
  Set objConnInv= Server.CreateObject("ADODB.Connection")
  objConnInv.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source= " + Request.ServerVariables("APPL_PHYSICAL_PATH") +"\Purchases.mdb"

  If Session("blnValidUser") = True and Session("PersonID") = "" Then
    Dim rsPersonIDCheck
    Set rsPersonIDCheck = Server.CreateObject("ADODB.Recordset")
    Dim strSQL
    strSQL = "SELECT PersonID FROM Person " & _
             "WHERE EMailAddress = '" & Session("EMailAddress") & "';"
    rsPersonIDCheck.Open strSQL, objConn
    If rsPersonIDCheck.EOF Then
      Session("blnValidUser") = False
    Else
    Response.Write "Testing"
      Session("PersonID") = rsPersonIDCheck("PersonID")
    End If
    rsPersonIDCheck.Close
    Set rsPersonIDCheck = Nothing
  End If
%>

********************

I have no idea where to look for a solution. I've checked the metabase.xml file to see if there was anything there referencing the D:\ drive (which is nonexistent on this machine)

What puzzles me is that the error references the D: drive in both the path and the path for the file that is being included.

Can someone please direct me to some kind of solution?

By the way, the correct path should be:

'C:\Inetpub\wwwroot\lawsuit-free\MemberArea\Misc\Login.mdb'

And we can access the same page via an ip address directly without the error.

Thanks,

Guy Davis
guytdavisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

muzzy2003Commented:
Some questions:

1. Are there multiple sites on this server? Is there one set to respond to the host header you normally use that is not the default web site?

2. What, if anything, is in C:\Inetpub\wwwroot\lawsuit-free?

3. Is there a virtual directory in use here?

4. Have you considered using Server.MapPath instead?
0
guytdavisAuthor Commented:
1. Yes, there are multiple sites on the server. I am not sure about the 2nd part to this question.
2. in c:\inetpub\wwwroot\lawsuit-free is the main website
3. I have no idea if a virtual directory is in use. how do I find our?
4. I'll try this... I'm not an asp expert but maybe this will solve the problem
0
muzzy2003Commented:
Sorry, 2 should have said what is in D:\...

1. In IIS Manager, click on Web Sites. In the list, is there a site other than your own that has a blank under "Host header value" and 80 under "Port" in the table? What is under "Host header value" by your site?

3. May be irrelevant - hold off on that one until I know more about 1 and 2.
0
guytdavisAuthor Commented:
1. there is no d: drive on this computer - there was a D: on the old computer that this site was moved from

all of the sites have a blank under "Host header value" including this one
2 sites have 8099, 5479 under "Port" - both of these are Stopped
0
muzzy2003Commented:
Hmmm. The IIS metabase seems to be corrupted in that case. How did you transfer the old site to the new server?

There is an article here on restoring a backup if there is one. Try the steps in there (you might not be able to or want to uninstall and reinstall IIS, but at least go down to that point if you can).

http://hacks.oreilly.com/pub/h/1153

As a workaround, Server.MapPath may sort you out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.