Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am working in ASP.net using C#.net VS 2008. I am try to get DB backup from SQL programatically. It will work if i give the path on my local derive D:/. Now my scenario changes to get DB Backup and store on the server side. I create Directory DBbakup on route directory of ASP.net It through an Exception
Cannot open backup device 'C:\Documents and Settings\Administrator\Desktop\MyCurrentWorking Dir\30122011\images\DBBakup\05-01-2012-3-waqar.bak'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.
The statement has been terminated.
Posted
Updated 6-Jan-12 0:43am
v2

1 solution

Change the App pool identity of your web app to a super user (having admin rights)...as ASP.NET runs with medium security level permossion, thats why Ur not getting the proper access to the device.
 
Share this answer
 
Comments
waqar ahmad (Dev) 6-Jan-12 7:02am    
How i change this security level permission
waqar ahmad (Dev) 6-Jan-12 7:07am    
From where i change the App pool indentity

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900