asp program trying to open ms access 97 database on network fails

Discussion in 'ASP General' started by jannordgreen@gmail.com, Mar 28, 2006.

  1. Guest

    I try to run http://localhost/scroller/scrollertest.asp in my IE 6
    browser.

    The asp program tries to connect to a MS Access 97 database.

    The program works when the database is sitting on any local drive, but
    when I put it on a network drive I get this error message:

    Error Type:
    Microsoft JET Database Engine (0x80004005)
    The Microsoft Jet database engine cannot open the file 'g:\test97.mdb'.
    It is already opened exclusively by another user, or you need
    permission to view its data.
    /scroller/scrollertest.asp, line 31

    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322;
    ..NET CLR 2.0.50727)

    The file is not opened by anyone else and no password is set to view
    its data.

    This is the important part of the code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <body>
    <%
    Dim adoCon
    Set adoCon = Server.CreateObject("ADODB.Connection")
    adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & "g:\test97.mdb"
    ....

    Which permissions are needed?
     
    , Mar 28, 2006
    #1
    1. Advertising

  2. First thing to realize is that ASP pages don't run as you. So, while you
    may have a drive mapped as G: somewhere, the ASP user doesn't also have this
    drive.

    Will this database exist on a remote share when the application you're
    working on goes into production? If not, I'd leave it on the C drive of
    your machine for testing purposes. But, if you need to have it remote like
    that, take a look at this article: http://www.aspfaq.com/show.asp?id=2168

    Ray at work


    <> wrote in message
    news:...
    >I try to run http://localhost/scroller/scrollertest.asp in my IE 6
    > browser.
    >
    > The asp program tries to connect to a MS Access 97 database.
    >
    > The program works when the database is sitting on any local drive, but
    > when I put it on a network drive I get this error message:
    >
    > Error Type:
    > Microsoft JET Database Engine (0x80004005)
    > The Microsoft Jet database engine cannot open the file 'g:\test97.mdb'.
    > It is already opened exclusively by another user, or you need
    > permission to view its data.
    > /scroller/scrollertest.asp, line 31
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322;
    > .NET CLR 2.0.50727)
    >
    > The file is not opened by anyone else and no password is set to view
    > its data.
    >
    > This is the important part of the code:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > <html>
    > <body>
    > <%
    > Dim adoCon
    > Set adoCon = Server.CreateObject("ADODB.Connection")
    > adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    > "Data Source=" & "g:\test97.mdb"
    > ...
    >
    > Which permissions are needed?
    >
     
    Ray Costanzo [MVP], Mar 28, 2006
    #2
    1. Advertising

  3. Guest

    Thanks Ray!

    The database is on a server on the network.

    I followed the link you gave. Then I right clicked 'Default Web Site'
    in the Internet Services Manager and chose Properties - Directory
    Security - Edit (for Anonymous access and authentication control) -
    Edit (for Anonymous access) - unchecked 'Allow IIS to control password
    - OK - OK - OK.

    Now it works!
     
    , Mar 28, 2006
    #3
    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. THY
    Replies:
    4
    Views:
    517
    Gönen EREN
    Aug 22, 2003
  2. Ezra
    Replies:
    1
    Views:
    625
    bruce barker
    Oct 11, 2004
  3. Replies:
    2
    Views:
    5,820
    Paul Clement
    Dec 30, 2005
  4. damezumari
    Replies:
    0
    Views:
    584
    damezumari
    Mar 27, 2006
  5. Dominick Baier [DevelopMentor]

    Windows authentication with impersonation - network resource access fails

    Dominick Baier [DevelopMentor], Mar 18, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    143
    Dominick Baier [DevelopMentor]
    Mar 18, 2005
Loading...

Share This Page