开发者

How to create a local server for website in Visual Studio 2010

开发者 https://www.devze.com 2023-03-04 03:48 出处:网络
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.

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消