ASP.net error in OledbConnection while accesing network share Access 2000 DB file

  • Thread starter Thread starter BizWorld
  • Start date Start date
B

BizWorld

My ASP.net application reads data from access 2000 db and write data in

SQL server.
Access Db application is on Network share folder. network share folder
permission is set to fullControl for Everyone. when i try to connect
with Access DB using OleDBConnection, it fails with the
message..................................................................



'H:\prodDB\prodData.mdb' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on
which the file
resides....................................................................­.



While H is a mapped drive to network share. I run the same code in
Windows application, it worked fine. but when i Put this in ASP.net, it

fails with above error. I changed ProcessModel tag in Machine.config to

run under "system" user. and added identity tag in web.config file but
it work only on Dev machine. when i access dev URL from other machine
then this code fails.


I am stuck in this since last two days, it is very URGENT.
 
The problem could be that the mapped drive is only seeable by the logged-in
user when the drave is mapped. (Say, when you log in and map a network share
as a drive. You can use the drive as if it is a local drive. However, when
the other user logs on this computer, he usually does not see this mapped
drive, he has to map his own, even the network share is the same, the mapped
drive label could be different for different user.

Now to your problem.

When you run Win App, you (or user) are always logged in. However, the
ASP.NET app running account is most likely not able to see the mapped drive
for other user (you). You could verify this by impersonate the asp.net app
running user account to your account. I'll bet the aps.net app would see the
mapped drive then.

Therefore, it is not good idea to use path pointing to a mapped drive for
service user accout such as ASP.NET running account.

My ASP.net application reads data from access 2000 db and write data in

SQL server.
Access Db application is on Network share folder. network share folder
permission is set to fullControl for Everyone. when i try to connect
with Access DB using OleDBConnection, it fails with the
message..................................................................



'H:\prodDB\prodData.mdb' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on
which the file
resides....................................................................­.



While H is a mapped drive to network share. I run the same code in
Windows application, it worked fine. but when i Put this in ASP.net, it

fails with above error. I changed ProcessModel tag in Machine.config to

run under "system" user. and added identity tag in web.config file but
it work only on Dev machine. when i access dev URL from other machine
then this code fails.


I am stuck in this since last two days, it is very URGENT.
 
Back
Top