c# Backup sql server database, error Operating system error 5(Access is denied.) I have been trying to backup an sql server database, and I understand that this error is in regards to drive write protection. I am at the end of my rope with this, as nothing that I have found online has helped with this at all. 

I have set up permissions for what should be considered every imaginable user that the server may try to pose as, everyone, administrators, my user, mssqlserver, sqlservermsasuser$xxx$MSSQLSERVER, SQLServer2005SQLBrowserUser, all with permissions set to full control. 

I've tried running visual studio as admin, i've tried running the built application as admin, I've changed the "log on as" for the mssqlserver service to "Local System Account", me, and admin. 

Yet still am having the same error, Operating System error 5 "Access is denied". 
The folder is not read only, and is not in the root of the drive.
Any ideas??

Thanks in advance
You can find the account that your SQL service runs as through the services dialog on the server. That's the account that needs write permission to the directory that you've specified.