February 14, 2008 at 6:37 am
Hi,
For some reason when i run my asp.net code it gets to SQLConnection.open() and kicks out this error,
Directory lookup for the file "C:\Documents and Settings\Ross Hinton\My Documents\Visual Studio 2005\WebSites\uploadsite\App_Data\picturesdb.mdf" failed with the operating system error 5(Access is denied.).
Cannot attach the file 'C:\Documents and Settings\Ross Hinton\My Documents\Visual Studio 2005\WebSites\uploadsite\App_Data\picturesdb.mdf' as database 'picturesdb'.
I heard it could be the permissions so i navigated to the SQL folder and changed the permissions in there so all 4 boxes are unticked, restarted SQL server 2005 and it still comes up with same error, any ideas whats going on???
Thanks
Ross
February 14, 2008 at 7:18 am
rosshinton (2/14/2008)
Hi,For some reason when i run my asp.net code it gets to SQLConnection.open() and kicks out this error,
Directory lookup for the file "C:\Documents and Settings\Ross Hinton\My Documents\Visual Studio 2005\WebSites\uploadsite\App_Data\picturesdb.mdf" failed with the operating system error 5(Access is denied.).
Cannot attach the file 'C:\Documents and Settings\Ross Hinton\My Documents\Visual Studio 2005\WebSites\uploadsite\App_Data\picturesdb.mdf' as database 'picturesdb'.
I heard it could be the permissions so i navigated to the SQL folder and changed the permissions in there so all 4 boxes are unticked, restarted SQL server 2005 and it still comes up with same error, any ideas whats going on???
Thanks
Ross
Hello Ross,
You have given the subject as "Connection problem" but in fact from the error it is conveying that you are trying to attach a database file ".mdf" with a different name as "picturesdb.mdf".
It seems the database file which you are trying to attach is not detached properly and hence you are getting the error as "Access denied".
Please check once and confirm whether you are attaching the data files with a different name, if so whether you have detached the existing database files properly etc.
Hope thiis helps.
Thanks
Lucky
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply