How to connect asp.net to database- More Information-

Discussion in 'ASP .Net' started by buzz, Jun 15, 2005.

  1. buzz

    buzz Guest

    Thanks Ken,

    I found a possible fix, one of which was changing a attribute in the machine.config file called userName="Machine" to userName="System". I tried that and it worked. Does this cause any problems or should I resolve the premission problem with Access?

    That usually means that the ASP.NET account doesn't have Modify privileges
    where the Access file is located. Access needs to open a locking (.LDB) file
    so the current account has to have the right to create the file.

    "buzz" <> wrote in message
    news:SyKre.42246$...
    > I've tried to use the Data Wizard to connect to the Northwind sample
    > database in Office. I can preview the data in the data adapter, but when I
    > run the ASP page I get this error....
    >
    > The Microsoft Jet database engine cannot open the file 'C:\Program
    > Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb'. It is already
    > opened exclusively by another user, or you need permission to view its
    > data.
    >
    >
    > Any help or links to resolve this would be appreciated......



    --------------= Posted using GrabIt =----------------
    ------= Binary Usenet downloading made easy =---------
    -= Get GrabIt for free from http://www.shemes.com/ =-
     
    buzz, Jun 15, 2005
    #1
    1. Advertising

  2. On Tue, 14 Jun 2005 21:40:36 -0500, buzz <> wrote:

    > Thanks Ken,
    >
    > I found a possible fix, one of which was changing a attribute in the
    > machine.config file called userName="Machine" to userName="System". I
    > tried that and it worked. Does this cause any problems or should I
    > resolve the premission problem with Access?
    >
    > That usually means that the ASP.NET account doesn't have Modify
    > privileges
    > where the Access file is located. Access needs to open a locking (.LDB)
    > file
    > so the current account has to have the right to create the file.
    >


    I would recommend trying to fix the permission problem. Normally you just
    need to give the aspnet user the proper permissions to the folder where
    the database file is at.

    The reason I recommend against the machine.config tweak you made is that
    now you've given the aspnet process system-level rights, like there used
    to be with old ASP by default. Very powerful, too powerful, that's why
    they 'locked' this down by default on purpose (setting it to machine), to
    help prevent 'exploits' or malicious code from being able to take over a
    server, in essence.

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
     
    Craig Deelsnyder, Jun 15, 2005
    #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. z. f.
    Replies:
    0
    Views:
    721
    z. f.
    Feb 3, 2005
  2. subrato
    Replies:
    8
    Views:
    948
    Juan T. Llibre
    Mar 14, 2006
  3. Michael
    Replies:
    4
    Views:
    473
    Matt Hammond
    Jun 26, 2006
  4. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    243
    Jeff Wood
    Sep 29, 2005
  5. Replies:
    2
    Views:
    335
Loading...

Share This Page