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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A P

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

    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=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
    Server.MapPath( "Z:\AccessDB\ac cess.mdb")
    set conn = CreateObject("A DODB.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

    #2
    Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

    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


    Keeping it FREE!


    "A P" <mark@textguru. ph> wrote in message
    news:#ylbhOyiEH A.396@TK2MSFTNG P12.phx.gbl...[color=blue]
    > 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[/color]
    physical[color=blue]
    > path was used.
    >
    >
    >
    > the conn.asp code :
    >
    > <%
    > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
    > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
    > set conn = CreateObject("A DODB.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?
    >
    >[/color]


    Comment

    • A P

      #3
      Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

      i remove server.mapPath( ) like this:

      <%
      cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=Z:\DB\ac cess.mdb;"
      set conn = CreateObject("A DODB.Connection ")
      conn.open cst
      %>

      the next error is this:

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

      /cn.asp, line 4



      "Steven Burn" <pvt@noyb.com > wrote in message
      news:eDRBVSyiEH A.3664@TK2MSFTN GP11.phx.gbl...[color=blue]
      > The problem is, you've used a physical path, and not a virtual one, just[/color]
      as[color=blue]
      > 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" <mark@textguru. ph> wrote in message
      > news:#ylbhOyiEH A.396@TK2MSFTNG P12.phx.gbl...[color=green]
      > > 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[/color]
      > physical[color=green]
      > > path was used.
      > >
      > >
      > >
      > > the conn.asp code :
      > >
      > > <%
      > > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
      > > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
      > > set conn = CreateObject("A DODB.Connection ")
      > > conn.open cst
      > > %>
      > >
      > > Do I need to locate the mdb file inside the wwwroot? how about enable[/color][/color]
      web[color=blue][color=green]
      > > sharing on the Z:\AccessDB, is this required even though I set change
      > > permission on IUSR account?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Steven Burn

        #4
        Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

        Is the path to the file correct?

        If so, take a look at;

        All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.


        --

        Regards

        Steven Burn
        Ur I.T. Mate Group


        Keeping it FREE!


        "A P" <mark@textguru. ph> wrote in message
        news:uV2SnYyiEH A.2500@TK2MSFTN GP15.phx.gbl...[color=blue]
        > i remove server.mapPath( ) like this:
        >
        > <%
        > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=Z:\DB\ac cess.mdb;"
        > set conn = CreateObject("A DODB.Connection ")
        > conn.open cst
        > %>
        >
        > the next error is this:
        >
        > Microsoft JET Database Engine error '80004005'
        > Could not find file 'Z:\DB\access.m db'.
        >
        > /cn.asp, line 4
        >
        >
        >
        > "Steven Burn" <pvt@noyb.com > wrote in message
        > news:eDRBVSyiEH A.3664@TK2MSFTN GP11.phx.gbl...[color=green]
        > > The problem is, you've used a physical path, and not a virtual one, just[/color]
        > as[color=green]
        > > 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" <mark@textguru. ph> wrote in message
        > > news:#ylbhOyiEH A.396@TK2MSFTNG P12.phx.gbl...[color=darkred]
        > > > 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[/color]
        > > physical[color=darkred]
        > > > path was used.
        > > >
        > > >
        > > >
        > > > the conn.asp code :
        > > >
        > > > <%
        > > > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
        > > > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
        > > > set conn = CreateObject("A DODB.Connection ")
        > > > conn.open cst
        > > > %>
        > > >
        > > > Do I need to locate the mdb file inside the wwwroot? how about enable[/color][/color]
        > web[color=green][color=darkred]
        > > > sharing on the Z:\AccessDB, is this required even though I set change
        > > > permission on IUSR account?
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Bob Barrows [MVP]

          #5
          Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

          A P wrote:[color=blue]
          > 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=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
          > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
          > set conn = CreateObject("A DODB.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?[/color]

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



          --
          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"


          Comment

          • Jeff Cochran

            #6
            Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

            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" <mark@textguru. ph> wrote:
            [color=blue]
            >i remove server.mapPath( ) like this:
            >
            ><%
            > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=Z:\DB\ac cess.mdb;"
            > set conn = CreateObject("A DODB.Connection ")
            > conn.open cst
            >%>
            >
            >the next error is this:
            >
            > Microsoft JET Database Engine error '80004005'
            >Could not find file 'Z:\DB\access.m db'.
            >
            >/cn.asp, line 4
            >
            >
            >
            >"Steven Burn" <pvt@noyb.com > wrote in message
            >news:eDRBVSyiE HA.3664@TK2MSFT NGP11.phx.gbl.. .[color=green]
            >> The problem is, you've used a physical path, and not a virtual one, just[/color]
            >as[color=green]
            >> 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" <mark@textguru. ph> wrote in message
            >> news:#ylbhOyiEH A.396@TK2MSFTNG P12.phx.gbl...[color=darkred]
            >> > 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[/color]
            >> physical[color=darkred]
            >> > path was used.
            >> >
            >> >
            >> >
            >> > the conn.asp code :
            >> >
            >> > <%
            >> > cst = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
            >> > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
            >> > set conn = CreateObject("A DODB.Connection ")
            >> > conn.open cst
            >> > %>
            >> >
            >> > Do I need to locate the mdb file inside the wwwroot? how about enable[/color][/color]
            >web[color=green][color=darkred]
            >> > sharing on the Z:\AccessDB, is this required even though I set change
            >> > permission on IUSR account?
            >> >
            >> >[/color]
            >>
            >>[/color]
            >[/color]

            Comment

            • Aaron [SQL Server MVP]

              #7
              Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

              Also see http://www.aspfaq.com/2168

              --

              (Reverse address to reply.)




              "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
              news:u3RTKL1iEH A.3664@TK2MSFTN GP12.phx.gbl...[color=blue]
              > A P wrote:[color=green]
              > > 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=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
              > > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
              > > set conn = CreateObject("A DODB.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?[/color]
              >
              > 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"
              >
              >[/color]


              Comment

              • A P

                #8
                Re: Server.MapPath( ) error 'ASP 0172 : 80004005'

                Hi Bob/Aaron!

                Z is on my local drive.

                Mark

                "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
                news:OXGvP73iEH A.3320@TK2MSFTN GP11.phx.gbl...[color=blue]
                > Also see http://www.aspfaq.com/2168
                >
                > --
                > http://www.aspfaq.com/
                > (Reverse address to reply.)
                >
                >
                >
                >
                > "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
                > news:u3RTKL1iEH A.3664@TK2MSFTN GP12.phx.gbl...[color=green]
                > > A P wrote:[color=darkred]
                > > > 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=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
                > > > Server.MapPath( "Z:\AccessDB\ac cess.mdb")
                > > > set conn = CreateObject("A DODB.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?[/color]
                > >
                > > 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"
                > >
                > >[/color]
                >
                >[/color]


                Comment

                Working...