PRB: Cannnot Connect to Access Database from ASP.NET (316675)

Discussion in 'ASP .Net' started by Patricia Kline, Oct 24, 2003.

  1. I am not sure if this is the correct forum, however, here is my problem:

    I am writing my first web application in dotnet... I have written serveral windows applications in vb.net. I have added a oledb connection, and used the wizard to connect the database. I renamed the connection to cnn. On my page_load, I just have two lines of code:

    cnn.open
    cnn.close

    When i run the problem on my localhost... i get the follow error msg, The Microsoft Jet database enjine cannot open the file 'c:\db1.mdb'. It is alrady opened exclusively by another user, or you do not have permission to view its data.

    I found in the knowledge base that a known problem with connecting to an access db with asp.net. It lists several solutions and I have tried them all.

    I changed my machine.config processModel userName to "SYSTEM". I added the <identity impersonate = "true" /> to the web.config in my app. And there is no security on the access database. I have no idea what else to do. Can any one help me???
    Patricia Kline, Oct 24, 2003
    #1
    1. Advertising

  2. Patricia Kline

    Oliver Guest

    Re: Cannnot Connect to Access Database from ASP.NET (316675)

    Hi Patricia,

    Check to see if there's an .ldb file where the .mdb is located (it might be
    hidden). If you find it, delete it. Don't open the database via the file
    system - keep Windows Explorer away from the directory.

    Don't forget that Access needs to create a locking file, so the ASPNET user
    needs read/write and possibly full control on the directory where the .mdb file
    is located.

    If you are using impersonation make sure you uncheck Anonymous access in IIS
    and check Windows Integrated. That forces ASPNET to pass through the
    authentication of the browser user.


    "Patricia Kline" <> wrote in message
    news:...
    I am not sure if this is the correct forum, however, here is my problem:

    I am writing my first web application in dotnet... I have written serveral
    windows applications in vb.net. I have added a oledb connection, and used the
    wizard to connect the database. I renamed the connection to cnn. On my
    page_load, I just have two lines of code:

    cnn.open
    cnn.close

    When i run the problem on my localhost... i get the follow error msg, The
    Microsoft Jet database enjine cannot open the file 'c:\db1.mdb'. It is alrady
    opened exclusively by another user, or you do not have permission to view its
    data.

    I found in the knowledge base that a known problem with connecting to an access
    db with asp.net. It lists several solutions and I have tried them all.

    I changed my machine.config processModel userName to "SYSTEM". I added the
    <identity impersonate = "true" /> to the web.config in my app. And there is no
    security on the access database. I have no idea what else to do. Can any one
    help me???
    Oliver, Oct 25, 2003
    #2
    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. Miguel Angel Dinelli
    Replies:
    1
    Views:
    436
    Chris Jackson
    Nov 13, 2003
  2. news.amnet.net.au

    Empty values in TreeMap - cannnot be removed?

    news.amnet.net.au, Apr 19, 2004, in forum: Java
    Replies:
    3
    Views:
    894
    Roedy Green
    Apr 19, 2004
  3. Giovanni Azua
    Replies:
    1
    Views:
    356
    Fred Kleinschmidt
    Oct 31, 2006
  4. Agnes

    [Please help] Cannnot connect ODBC

    Agnes, Jan 31, 2004, in forum: ASP General
    Replies:
    6
    Views:
    252
  5. ATS
    Replies:
    4
    Views:
    120
    Evertjan.
    Mar 22, 2007
Loading...

Share This Page