0

Hi,

I am using asp.net 2.0, SQL 2005 Express Edition.

I have created one database, thats working fine on local host.

But when I transfered files to my hosting server, Then its giving me Error:-
Invalid value for key 'attachdbfilename'.

My connection string is as follows:-

data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|DataTestingServer.mdf;Database=DataTestingServer;User Instance=true


Please Help me.

Anup

3
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by kaar3k
0

you can write right click the database(mdf) file in the database(server) explorer and click properties..on the right side, you can view the properties window,Which you can get the connection string....
eg;
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Jacob Varghese\My Documents\Visual Studio 2005\WebSites\sample\App_Data\Database.mdf;Integrated Security=True;User Instance=True
you copy all that and use

string connectionstring="Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True";

Edited by ajijacobm: n/a

0

if you got it correct,please mark it as solved.

even i was having the same prob,,, it helped me in solving thanks bro :))))

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.