Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I create a setup in vs2010 for win application in .net c# with database mdf file attached. when i install this any pc then mdf file becomes read only and its given access denied error in win 7. it will work after given rights manually but its not right way.

so any one suggest me how it will resolve this problem...
Posted

Probably, this is related to where you have put the file - if it is in your application folder then it will be unavailable since the system does not like people changing the content of application files without admin rights.

Look at moving it to a more "friendly" location: Where should I store my data?[^] should help.
 
Share this answer
 
In your setup, you could include a custom action which sets the access rights to the file. That may sometimes happen to be necessary when you put the file into a subfolder of the ProgramData folder too.
 
Share this answer
 
Comments
rajenshahu 17-Apr-13 12:13pm    
I put the code for assign access rights for application installation folder but its not working..

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