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

B

buzz

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 said:
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/ =-
 
C

Craig Deelsnyder

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top