Forum Moderators: open
To test this theory, I created a folder on the remote machine and stuck a “test” Access database in it. I gave every permission I could think of to this folder and database; ie everyone, system, etc, etc. However, nothing I try seems to work. Every time I try to view my app in a browser, I get the error:
The Microsoft Jet database engine cannot open the file 'P:\myfolder\mydb.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
The problem seems to be entirely related to the network. Point to an exact copy on the local machine and everything works fine. The test database is not open or locked. No workgroup has been assigned to it.
From the information I’ve found, it seems this error is caused by security and sharing issues. But, as I’ve said, I’ve tried to give every permission and share I could think of to the test folder and database. Nothing works short of moving everything to the same machine. I did get this one bit of advice from someone,
“When your code executes inside IIS 5.0, it's running as the 'ASPNET' user account, which only exists on that local machine. Chances are the share does not have permissions defined for this user. The only way I know of to get this to work is to set the two machines up in the same domain and use impersonation/delegation to let the code running as the ASPNET user pretend to be a domain user that has the authority to access the share.”
…but none of this makes sense to me.
Can anyone who has experienced this please walk me through the steps to getting this thing to work across a network. I have got to figure it out somehow……………!
Many thanx
You can *test* this by simply setting the NTFS security permissions. You can TEMPORARILY allow the group 'Everyone' to have full access. THIS SHOULD BE REVERTED BACK AFTER AND APPROPRIATE SETTINGS APPLIED.
I think you might have to impersonate a user account from the box with the database on.
You can set fixed identities for specific virtual directories by using the following setting in web.config.
<identity impersonate="true" userName="YourAccount"
password="YourStrongPassword" />
I am not 100% as I have not tried it, but give it a go.
But Im no server guy. How does one set permissions and such to accounts on another box? I cant seem to figure it out. To me, it all seems local.........
You can however create a local account on each computer with the same accountname and password. you give this account the appropriate permissions to the folder containing the database. You then configure your website to browse anonymously using this account.
This should work. But a little messy.