开发者

How to stop Visual to put web.config when I compile web site project

In my web application (Dotnetnuke 5) site, for development purposes I made a virtual directory und开发者_如何学Pythoner the main website.

As a result, in my solution I have the main Web site as well as the virtual directory website which is actually a folder inside this main web site.

Now I want to have this as a virtual directory because I want to focus differently on this virtual directory project. However, my problem is the following.

---REAL PROBLEM HERE--- When I try to compile this virtual directory for any reason, it places a web.config in this VD which screws my system.

---Questions 1. How can I prevent VS to automatically place web.config here? 2. Or alternatively how can I make this web.config completely ignorant or in other works let it have 0 effect some how?


Do you have NAnt installed and knowledge of MSBuild? You could use MSBuild to compile your project, and then use an NAnt script to perform any post build operations (such as deleting your stray web.config file, or updating connection strings for a particular environment etc.)


What type of Visual Studio project is it that is located within the virtual directory? My thought is that you're using a Web Site Project (WSP), which would be more likely to auto-generate a web.config file.

I know from experience that compiling a Web Application Project (WAP) does not automatically create a web.config (although certain actions still will, like adding a new web service to your project). Perhaps you can look into using a WAP.


Are you sure it's Visual Studio that's adding the web.config? I know that IIS will add a web.config if you make customizations to the web site/application. I'm not sure if this is the case with virtual directories, though.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜