Problem: (asp.net 2.0)
I x-copy from my development server a database named C:\site_test\site.mdf to C:\site. When I attach the database with Server Management Studio Express, it list the name as: "C:\site_test\site.mdf" eventhough on the live server the database is in the C:\site directory and my connection string in my web.config is "C:\site\site.mdf".
But everything works until a week later when I need to make a field change to a table on the live site: I'm forced to re-attach the database, but this time it list the database as:C:\site\site.mdf". When I re-attach I get a NT AUTHORITY\SERVICE does not have permission. So I give NT AUTHORITY\SERVICE permission on the directory and files and ownership with Server Management Stuidio Express, but I still get the error.
What am I'm doing wrong? Thanks for the help
--Dietrich
Hi Dietrich,
If you have attached the .mdf file to database manually, please check if you have set the connection string accordingly.
It has to be "Data Source=ServerName\Instancename; Initial Catelog=DatabaseName"
No comments:
Post a Comment