Server.MapPath() error 'ASP 0172 : 80004005'

Discussion in 'ASP General' started by A P, Aug 26, 2004.

  1. A P

    A P Guest

    I receive an error like this:
    Server.MapPath() error 'ASP 0172 : 80004005'

    Invalid Path

    /conn.asp, line 2

    The Path parameter for the MapPath method must be a virtual path. A physical
    path was used.



    the conn.asp code :

    <%
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    Server.MapPath("Z:\AccessDB\access.mdb")
    set conn = CreateObject("ADODB.Connection")
    conn.open cst
    %>

    Do I need to locate the mdb file inside the wwwroot? how about enable web
    sharing on the Z:\AccessDB, is this required even though I set change
    permission on IUSR account?
    A P, Aug 26, 2004
    #1
    1. Advertising

  2. A P

    Steven Burn Guest

    The problem is, you've used a physical path, and not a virtual one, just as
    the message says.....

    Either remove Server.MapPath(), or change the path to a virtual one.....
    --

    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!


    "A P" <> wrote in message
    news:#...
    > I receive an error like this:
    > Server.MapPath() error 'ASP 0172 : 80004005'
    >
    > Invalid Path
    >
    > /conn.asp, line 2
    >
    > The Path parameter for the MapPath method must be a virtual path. A

    physical
    > path was used.
    >
    >
    >
    > the conn.asp code :
    >
    > <%
    > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > Server.MapPath("Z:\AccessDB\access.mdb")
    > set conn = CreateObject("ADODB.Connection")
    > conn.open cst
    > %>
    >
    > Do I need to locate the mdb file inside the wwwroot? how about enable web
    > sharing on the Z:\AccessDB, is this required even though I set change
    > permission on IUSR account?
    >
    >
    Steven Burn, Aug 26, 2004
    #2
    1. Advertising

  3. A P

    A P Guest

    i remove server.mapPath() like this:

    <%
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\DB\access.mdb;"
    set conn = CreateObject("ADODB.Connection")
    conn.open cst
    %>

    the next error is this:

    Microsoft JET Database Engine error '80004005'
    Could not find file 'Z:\DB\access.mdb'.

    /cn.asp, line 4



    "Steven Burn" <> wrote in message
    news:...
    > The problem is, you've used a physical path, and not a virtual one, just

    as
    > the message says.....
    >
    > Either remove Server.MapPath(), or change the path to a virtual one.....
    > --
    >
    > Regards
    >
    > Steven Burn
    > Ur I.T. Mate Group
    > www.it-mate.co.uk
    >
    > Keeping it FREE!
    >
    >
    > "A P" <> wrote in message
    > news:#...
    > > I receive an error like this:
    > > Server.MapPath() error 'ASP 0172 : 80004005'
    > >
    > > Invalid Path
    > >
    > > /conn.asp, line 2
    > >
    > > The Path parameter for the MapPath method must be a virtual path. A

    > physical
    > > path was used.
    > >
    > >
    > >
    > > the conn.asp code :
    > >
    > > <%
    > > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > Server.MapPath("Z:\AccessDB\access.mdb")
    > > set conn = CreateObject("ADODB.Connection")
    > > conn.open cst
    > > %>
    > >
    > > Do I need to locate the mdb file inside the wwwroot? how about enable

    web
    > > sharing on the Z:\AccessDB, is this required even though I set change
    > > permission on IUSR account?
    > >
    > >

    >
    >
    A P, Aug 26, 2004
    #3
  4. A P

    Steven Burn Guest

    Is the path to the file correct?

    If so, take a look at;

    www.connectionstrings.com

    --

    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!


    "A P" <> wrote in message
    news:...
    > i remove server.mapPath() like this:
    >
    > <%
    > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\DB\access.mdb;"
    > set conn = CreateObject("ADODB.Connection")
    > conn.open cst
    > %>
    >
    > the next error is this:
    >
    > Microsoft JET Database Engine error '80004005'
    > Could not find file 'Z:\DB\access.mdb'.
    >
    > /cn.asp, line 4
    >
    >
    >
    > "Steven Burn" <> wrote in message
    > news:...
    > > The problem is, you've used a physical path, and not a virtual one, just

    > as
    > > the message says.....
    > >
    > > Either remove Server.MapPath(), or change the path to a virtual one.....
    > > --
    > >
    > > Regards
    > >
    > > Steven Burn
    > > Ur I.T. Mate Group
    > > www.it-mate.co.uk
    > >
    > > Keeping it FREE!
    > >
    > >
    > > "A P" <> wrote in message
    > > news:#...
    > > > I receive an error like this:
    > > > Server.MapPath() error 'ASP 0172 : 80004005'
    > > >
    > > > Invalid Path
    > > >
    > > > /conn.asp, line 2
    > > >
    > > > The Path parameter for the MapPath method must be a virtual path. A

    > > physical
    > > > path was used.
    > > >
    > > >
    > > >
    > > > the conn.asp code :
    > > >
    > > > <%
    > > > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > > Server.MapPath("Z:\AccessDB\access.mdb")
    > > > set conn = CreateObject("ADODB.Connection")
    > > > conn.open cst
    > > > %>
    > > >
    > > > Do I need to locate the mdb file inside the wwwroot? how about enable

    > web
    > > > sharing on the Z:\AccessDB, is this required even though I set change
    > > > permission on IUSR account?
    > > >
    > > >

    > >
    > >

    >
    >
    Steven Burn, Aug 26, 2004
    #4
  5. A P wrote:
    > I receive an error like this:
    > Server.MapPath() error 'ASP 0172 : 80004005'
    >
    > Invalid Path
    >
    > /conn.asp, line 2
    >
    > The Path parameter for the MapPath method must be a virtual path. A
    > physical path was used.
    >
    >
    >
    > the conn.asp code :
    >
    > <%
    > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > Server.MapPath("Z:\AccessDB\access.mdb")
    > set conn = CreateObject("ADODB.Connection")
    > conn.open cst
    > %>
    >
    > Do I need to locate the mdb file inside the wwwroot? how about enable
    > web sharing on the Z:\AccessDB, is this required even though I set
    > change permission on IUSR account?


    Is Z a local drive or a mapped drive to a remote machine?

    http://www.aspfaq.com/show.asp?id=2009

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Aug 26, 2004
    #5
  6. A P

    Jeff Cochran Guest

    See my answer in your other thread. Stick to one thread and pay
    attention to the error messages.

    Jeff

    On Thu, 26 Aug 2004 12:36:37 +0800, "A P" <> wrote:

    >i remove server.mapPath() like this:
    >
    ><%
    > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\DB\access.mdb;"
    > set conn = CreateObject("ADODB.Connection")
    > conn.open cst
    >%>
    >
    >the next error is this:
    >
    > Microsoft JET Database Engine error '80004005'
    >Could not find file 'Z:\DB\access.mdb'.
    >
    >/cn.asp, line 4
    >
    >
    >
    >"Steven Burn" <> wrote in message
    >news:...
    >> The problem is, you've used a physical path, and not a virtual one, just

    >as
    >> the message says.....
    >>
    >> Either remove Server.MapPath(), or change the path to a virtual one.....
    >> --
    >>
    >> Regards
    >>
    >> Steven Burn
    >> Ur I.T. Mate Group
    >> www.it-mate.co.uk
    >>
    >> Keeping it FREE!
    >>
    >>
    >> "A P" <> wrote in message
    >> news:#...
    >> > I receive an error like this:
    >> > Server.MapPath() error 'ASP 0172 : 80004005'
    >> >
    >> > Invalid Path
    >> >
    >> > /conn.asp, line 2
    >> >
    >> > The Path parameter for the MapPath method must be a virtual path. A

    >> physical
    >> > path was used.
    >> >
    >> >
    >> >
    >> > the conn.asp code :
    >> >
    >> > <%
    >> > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    >> > Server.MapPath("Z:\AccessDB\access.mdb")
    >> > set conn = CreateObject("ADODB.Connection")
    >> > conn.open cst
    >> > %>
    >> >
    >> > Do I need to locate the mdb file inside the wwwroot? how about enable

    >web
    >> > sharing on the Z:\AccessDB, is this required even though I set change
    >> > permission on IUSR account?
    >> >
    >> >

    >>
    >>

    >
    Jeff Cochran, Aug 26, 2004
    #6
  7. Also see http://www.aspfaq.com/2168

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > A P wrote:
    > > I receive an error like this:
    > > Server.MapPath() error 'ASP 0172 : 80004005'
    > >
    > > Invalid Path
    > >
    > > /conn.asp, line 2
    > >
    > > The Path parameter for the MapPath method must be a virtual path. A
    > > physical path was used.
    > >
    > >
    > >
    > > the conn.asp code :
    > >
    > > <%
    > > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > Server.MapPath("Z:\AccessDB\access.mdb")
    > > set conn = CreateObject("ADODB.Connection")
    > > conn.open cst
    > > %>
    > >
    > > Do I need to locate the mdb file inside the wwwroot? how about enable
    > > web sharing on the Z:\AccessDB, is this required even though I set
    > > change permission on IUSR account?

    >
    > Is Z a local drive or a mapped drive to a remote machine?
    >
    > http://www.aspfaq.com/show.asp?id=2009
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
    Aaron [SQL Server MVP], Aug 26, 2004
    #7
  8. A P

    A P Guest

    Hi Bob/Aaron!

    Z is on my local drive.

    Mark

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > Also see http://www.aspfaq.com/2168
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    > > A P wrote:
    > > > I receive an error like this:
    > > > Server.MapPath() error 'ASP 0172 : 80004005'
    > > >
    > > > Invalid Path
    > > >
    > > > /conn.asp, line 2
    > > >
    > > > The Path parameter for the MapPath method must be a virtual path. A
    > > > physical path was used.
    > > >
    > > >
    > > >
    > > > the conn.asp code :
    > > >
    > > > <%
    > > > cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > > Server.MapPath("Z:\AccessDB\access.mdb")
    > > > set conn = CreateObject("ADODB.Connection")
    > > > conn.open cst
    > > > %>
    > > >
    > > > Do I need to locate the mdb file inside the wwwroot? how about enable
    > > > web sharing on the Z:\AccessDB, is this required even though I set
    > > > change permission on IUSR account?

    > >
    > > Is Z a local drive or a mapped drive to a remote machine?
    > >
    > > http://www.aspfaq.com/show.asp?id=2009
    > >
    > > --
    > > Microsoft MVP - ASP/ASP.NET
    > > Please reply to the newsgroup. This email account is my spam trap so I
    > > don't check it very often. If you must reply off-line, then remove the
    > > "NO SPAM"
    > >
    > >

    >
    >
    A P, Aug 27, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?dHBhcmtzNjk=?=

    server.mappath vs. request.mappath

    =?Utf-8?B?dHBhcmtzNjk=?=, Mar 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,147
    Juan T. Llibre
    Mar 11, 2007
  2. Replies:
    4
    Views:
    967
    Juan T. Llibre
    Oct 7, 2007
  3. paul tomlinson
    Replies:
    2
    Views:
    158
    Peter James
    Jul 1, 2003
  4. Grahammer
    Replies:
    12
    Views:
    334
    Chris Hohmann
    Aug 21, 2003
  5. Lars Schouw

    Server object error 'ASP 0177 : 80004005'

    Lars Schouw, Apr 28, 2004, in forum: ASP General
    Replies:
    2
    Views:
    1,477
    Lars Schouw
    May 1, 2004
Loading...

Share This Page