Last post Dec 09, 2009 02:21 PM by lpieczynski
Dec 07, 2009 08:58 AM|lpieczynski|LINK
Hi. I'm a newbie to all of this so am just feeling my way along here. This is probably a simple solution - but i haven't been able to figure it out. I have an .aspx page that is making a call to an Access database through a accessdatasource link. When I
run this page on my local computer, it works fine. I uploaded all of the files to my website (hosted through a 3rd party) and also uploaded my database to the assigned location, I then changed the aspx file so that the "Datafile:" description of my accessdatasource
object points to the absolute path of the new location of my database. When I try running the page on the website, I get this error:
System.Web.HttpException: Access to path 'D:\Hosting\5296980\html\access_db\test.mdb' was denied. The location does not exist or is not accessible because of security settings.
I double checked that the test.mdb file truly is there and the permissions on that directory are all readable and writable. Am I missing some other security setting?
Thanks for the help!
Dec 07, 2009 10:05 AMfirstname.lastname@example.org|LINK
the permissions on that directory are all readable and writable.
Readable and writable to who? To use an Access database, the ASP.NET process account must have full control of the folder and files.
Dec 07, 2009 12:07 PM|lpieczynski|LINK
The directory where that database resides is supposedly "web writable and web readable". I'm assuming that means that anyone accessing that file from my web site would have access to read/write? I'm still trying to figure out exactly how the file storage/security
is working with this 3rd party hosting service. When I called their help desk to make sure there wasn't some other security step I was missing - they said there wasn't - that it must be a programmatic issue. Thanks for your reply.
Dec 07, 2009 12:26 PM|lpieczynski|LINK
One more update... When I move the location of the .mdb file to a different directory other than the "designated" folder for databases, everything loads fine - but that folder isn't writable so I think I just need to work through the writability permissions
on that database directory with my 3rd party provider. Thank you for your help!
Dec 07, 2009 03:39 PM|Mikesdotnetting|LINK
Move it to App_Data:
http://www.mikesdotnetting.com/Article/78/AccessDataSource-SqlDataSource-and-connecting-to-Access-databases-in-ASP.NET, and ensure that the NETWORK SERVICE account has MODIFY permissions on the folder.
Dec 09, 2009 02:21 PM|lpieczynski|LINK
Thanks. That worked. I appreciate the help!