停止 Visual Studio 2013 修改 IISExpress applicationHost.config [英] Stop Visual Studio 2013 modifying the IISExpress applicationHost.config
问题描述
我有一个使用 Visual Studio 2013 的网站项目,每次打开它时,它都会在 applicationHost.config 中为网站项目添加一个新条目.我使用 IISExpress 进行开发,但是我总是创建一个自定义条目来提供一些细节,并将其配置为使用端口 80,因此我不希望 Visual Studio 对此文件进行任何修改.
I have a website project using Visual Studio 2013, and each time I open it, it keeps adding a new entry for the website project in applicationHost.config. I use IISExpress for my development, however I always create a custom entry to provide some specifics and I have it configured to use port 80, so I would like to not have Visual Studio make any modifications to this file.
我已经进入工具 > 选项 > Web 项目并取消选中为网站和项目使用 64 位版本的 IIS Express",关闭解决方案,从 applicationHost.config 中删除条目并在 Visual 中重新打开项目Studio,但是它仍然继续向 applicationHost.config 添加一个条目,并将我的网站项目命名为该条目的名称.
I have gone into Tools > Options > Web Projects and unchecked "Use the 64 bit version of IIS Express for web sites and projects", closed the solution, removed the entry from applicationHost.config and re-opened the project in Visual Studio, however it still continues to add an entry to applicationHost.config and name my website project whatever that entry is named.
有没有办法完全断开 Visual Studio 与 IISExpress 的连接?我喜欢使用它,但我想自己控制该服务和配置.
Is there a way to disconnect Visual Studio entirely from IISExpress? I like using it, but I want to control that service and configuration myself.
推荐答案
在站点部分的绑定部分中,除了 localhost 版本之外,创建一个新的绑定,如下所示:
Inside the bindings section of the site section, create a new binding in addition to the localhost version like so:
<bindings>
<binding protocol="http" bindingInformation="*:21232:localhost" />
<binding protocol="http" bindingInformation="*:21232:*" />
</bindings>
在完成两行之后,VS 停止制作新的网站版块.
After having both lines, VS stopped making new site sections.
这篇关于停止 Visual Studio 2013 修改 IISExpress applicationHost.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!