Click here to Skip to main content
15,888,202 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a setup in C# and I have in build sql server 2008 exe with it, and data base attached with it.
My problem is this when I run setup in XP then its work properly but when I run it in windows 7 then it works properly in D,E,F drive but not works in C drive...
It shows the error which is...
you have not window authentication for data base.The database primary file in already exists and its read only 
My question is, How can I give window Authentication for my data base in windows 7.

My other problem is, when sql server 2008R2 is already exist in System then database works properly but its not exist in system than its show error while I have in build sql server 2008 exe.....

My connection string is
Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\crm.mdf;Integrated Security=SSPI;User Instance=True

If anyone can help me then please give me some solutions for it....

Thanks....
Posted
Updated 9-Jan-12 20:09pm
v3
Comments
Mehul M Thakkar 10-Jan-12 2:24am    
Is this application/setup executed with "Run as Administrator"?
manish the error 10-Jan-12 3:09am    
Thanks for reply,,,
when setup is executed with administrator in c:\ drive , its give the error for authentication....
manish the error 10-Jan-12 3:21am    
thanks for reply ,,,
yes the setup execute with administrator.
if u have any solution of my problem please send, i have faced it with last two days...
thanks again...

1 solution

Quote:
i have also faced same kind of problem. Actually there are some restriction on Win 7; you have to give permission to access your primary drive ie C.
go Control Pane----All Control Panel Items----System----Advanced System Settings---System Protection---Configure----Turn Off system Protection
 
Share this answer
 
Comments
manish the error 10-Jan-12 3:17am    
thanks for reply ,,,
i have done these steps already but its not working...
but i have given authentication from cmd of administrator its worked properly but i know its not the solution for it ,,, cos many person don't want to do these process in cmd ....
so please give me a solution for setup,,,,
how can i give authentication to our data base from my setup....

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