How to create a local server for website in Visual Studio 2010
I am trying to make a website using local server in visual studio 2010. I posted before about the errors that I got during debugging.
Now I just w开发者_开发知识库ant to make sure that I am doing the correct thing to create a local SQL server. I created a .mdf database in the App_code, configured the web.config and created a table for the .mdf database. Is that just what I need to do to create a local server?
thanks
If you have SQL Server installed on the machine, and you have the database in your App_Data directory then you can just connect it in the connection string:
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;
精彩评论