开发者

How to create an ASP.NET application with a default web.config?

I am creating an ASP.NET 2.0 application (using C#), and for some reason when I create the initial application it doesn't create the web.config file. Is this normal? I haven't touched ASP.NET in some years so I am a little rusty. I tried creating the web.config manually but can't seem to get it just r开发者_StackOverflow中文版ight. How can I create an ASP.NET application with a bundled web.config file? Thanks.


From the Website menu, go to Add New Item, and pick "Web Configuration File." That will give you a vanilla web.config that you can start with.

Visual Studio will not create a web.config file for you if you create an Empty Web site, so that would be normal behavior. Otherwise, it will create one for you.


I use VS2008 and when I hit F5, VS asks me if I want to create a default web.config (if one is not already present). What tools are you using for development ?


I found that the easiest way is just to hit F5.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜