read microsoft access file on windows server 2003

Discussion in 'ASP .Net' started by =?Utf-8?B?a2x5bm4=?=, Mar 14, 2006.

  1. Hi:
    I'm having problems reading a Microsoft Access file from my ASP.Net app on a
    Windows Server 2003 machine. The error message:
    The Microsoft database engine cannot open the file, <my_file>. It is
    already opened exclusively by another user, or you need permission to view
    its data.

    I've read some info about this (microsoft support article q316675) but I'm
    still confused on what to do?
    =?Utf-8?B?a2x5bm4=?=, Mar 14, 2006
    #1
    1. Advertising

  2. Is the file opened in Access when you are trying to open the database? Is
    there a .ldb file in the same folder as the database file? What provider are
    you using to connect to the database?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer

    Presuming that God is "only an idea" -
    Ideas exist.
    Therefore, God exists.

    "klynn" <> wrote in message
    news:...
    > Hi:
    > I'm having problems reading a Microsoft Access file from my ASP.Net app on
    > a
    > Windows Server 2003 machine. The error message:
    > The Microsoft database engine cannot open the file, <my_file>. It is
    > already opened exclusively by another user, or you need permission to view
    > its data.
    >
    > I've read some info about this (microsoft support article q316675) but I'm
    > still confused on what to do?
    Kevin Spencer, Mar 15, 2006
    #2
    1. Advertising

  3. There's not an .ldb file (lock file). thats not it. I'm using
    Microsoft.Jet.OLEDB.4.0.

    Key things here. It works on my machine running Win2000 with IIS.
    It doesnt work on Win2003 Server running IIS. I know the issue is specific
    to IIS on Win2003 Server.

    Also, I added to the web.config file:
    <identity impersonate="true"/> between the <system.web>
    that didnt fix it.
    Karen

    "Kevin Spencer" wrote:

    > Is the file opened in Access when you are trying to open the database? Is
    > there a .ldb file in the same folder as the database file? What provider are
    > you using to connect to the database?
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > ..Net Developer
    >
    > Presuming that God is "only an idea" -
    > Ideas exist.
    > Therefore, God exists.
    >
    > "klynn" <> wrote in message
    > news:...
    > > Hi:
    > > I'm having problems reading a Microsoft Access file from my ASP.Net app on
    > > a
    > > Windows Server 2003 machine. The error message:
    > > The Microsoft database engine cannot open the file, <my_file>. It is
    > > already opened exclusively by another user, or you need permission to view
    > > its data.
    > >
    > > I've read some info about this (microsoft support article q316675) but I'm
    > > still confused on what to do?

    >
    >
    >
    =?Utf-8?B?a2x5bm4=?=, Mar 15, 2006
    #3
  4. OK. so in the end, adding the <identity impersonate="true"/> to the
    web.config for the application fixed the problem. IIS had to be completely
    restarted afterwards.
    Karen

    "klynn" wrote:

    > There's not an .ldb file (lock file). thats not it. I'm using
    > Microsoft.Jet.OLEDB.4.0.
    >
    > Key things here. It works on my machine running Win2000 with IIS.
    > It doesnt work on Win2003 Server running IIS. I know the issue is specific
    > to IIS on Win2003 Server.
    >
    > Also, I added to the web.config file:
    > <identity impersonate="true"/> between the <system.web>
    > that didnt fix it.
    > Karen
    >
    > "Kevin Spencer" wrote:
    >
    > > Is the file opened in Access when you are trying to open the database? Is
    > > there a .ldb file in the same folder as the database file? What provider are
    > > you using to connect to the database?
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > ..Net Developer
    > >
    > > Presuming that God is "only an idea" -
    > > Ideas exist.
    > > Therefore, God exists.
    > >
    > > "klynn" <> wrote in message
    > > news:...
    > > > Hi:
    > > > I'm having problems reading a Microsoft Access file from my ASP.Net app on
    > > > a
    > > > Windows Server 2003 machine. The error message:
    > > > The Microsoft database engine cannot open the file, <my_file>. It is
    > > > already opened exclusively by another user, or you need permission to view
    > > > its data.
    > > >
    > > > I've read some info about this (microsoft support article q316675) but I'm
    > > > still confused on what to do?

    > >
    > >
    > >
    =?Utf-8?B?a2x5bm4=?=, Mar 15, 2006
    #4
  5. Hi Karen,

    > Key things here. It works on my machine running Win2000 with IIS.
    > It doesnt work on Win2003 Server running IIS. I know the issue is specific
    > to IIS on Win2003 Server.


    Actually, it has nothing to do with IIS, and everything to do with Windows
    2003 Server. The necessary permission is not a web server virtual directory
    permission, but a file system permission. The user account under which
    ASP.Net is running must have "read" (file) access to the folder.

    > Also, I added to the web.config file:
    > <identity impersonate="true"/> between the <system.web>
    > that didnt fix it.


    Of course not. This is not all that is necessary in order to impersonate an
    identity. It doesn't specify "who" to impersonate, nor does it supply their
    credentials. You need something like:

    <identity impersonate="true|false"
    userName="domain\username"
    password="password"/>

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer

    Presuming that God is "only an idea" -
    Ideas exist.
    Therefore, God exists.

    "klynn" <> wrote in message
    news:D...
    > There's not an .ldb file (lock file). thats not it. I'm using
    > Microsoft.Jet.OLEDB.4.0.
    >
    > Key things here. It works on my machine running Win2000 with IIS.
    > It doesnt work on Win2003 Server running IIS. I know the issue is specific
    > to IIS on Win2003 Server.
    >
    > Also, I added to the web.config file:
    > <identity impersonate="true"/> between the <system.web>
    > that didnt fix it.
    > Karen
    >
    > "Kevin Spencer" wrote:
    >
    >> Is the file opened in Access when you are trying to open the database? Is
    >> there a .ldb file in the same folder as the database file? What provider
    >> are
    >> you using to connect to the database?
    >>
    >> --
    >> HTH,
    >>
    >> Kevin Spencer
    >> Microsoft MVP
    >> ..Net Developer
    >>
    >> Presuming that God is "only an idea" -
    >> Ideas exist.
    >> Therefore, God exists.
    >>
    >> "klynn" <> wrote in message
    >> news:...
    >> > Hi:
    >> > I'm having problems reading a Microsoft Access file from my ASP.Net app
    >> > on
    >> > a
    >> > Windows Server 2003 machine. The error message:
    >> > The Microsoft database engine cannot open the file, <my_file>. It is
    >> > already opened exclusively by another user, or you need permission to
    >> > view
    >> > its data.
    >> >
    >> > I've read some info about this (microsoft support article q316675) but
    >> > I'm
    >> > still confused on what to do?

    >>
    >>
    >>
    Kevin Spencer, Mar 16, 2006
    #5
    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.

Share This Page