Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp.net connect to Access DB on mapped network drive 1

Status
Not open for further replies.

hamking01

Programmer
May 30, 2004
238
US
I'm trying to connect an ASP.net page to an Access DB. At first I had the Access DB on the local server's C drive. Now I need to move Access to another server. I've mapped the folder where the DB was moved to network drive Z: on the asp.net server. And change the Data Source of the connection string to Z:/mydb.mdb

Now it returns error: The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data.

Is there another method to set this up? Where I can have ASP.net/IIS on one server and have ADO connections to Access DB on another server. Thank you.
 
I tried it exact same code with the only change being the connection string. I had the Access db on my local server's c: drive. With part of the connection string being:

Jet OLEDB:System database=C:/local/system.mdw; Data Source=c:/local/WMBE.mdb;

Using this everything works fine. But once I move the the Access db to another server and map the network drive to z: and changing the connection string accordingly to:

Jet OLEDB:System database=z:/WM_DB/system.mdw; Data Source=z:/WM_DB/WMBE.mdb;

The error returns. The error sounds like a permission error, but I can't figure why the error would occur since it would work on local server but not on a remote one.
Any Ideas, thanx.

BTW, I've already set the z: drives sharing properties to Everyone
 
Give the database and its containing folder read/Write premission for the internet Guest Account (ServerName\User_Name)

if that doesnt work do the same for the IIS_WPG(ServerName\IIS_WPG)

the write permission is needed to write the.loc file for the access Database

Good luck


What would you attempt to accomplish if you knew you would not fail?
 
The server (#1) where the Access DB is located does not have ASP.net installed. I've given the folder and .mdb read/write rights to the internet Guest Account (ServerName\User_Name) where User_Name is my local server's (#2) computer name. However, this still does not work. Will I be needing to install asp.net onto the #1 server.
 
Got it, had to set identity impersonate=true in web.config. Also had to set userName and password to that of local server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top