如何一劳永逸地改变.vs\config\applicationhost.config?

how to change .vs\config\applicationhost.config once and for all?

我有一个 ASP.Net MVC 网络应用程序。当我最初创建项目时,我将其指定为 windows 身份验证。经过一些实验和开发,要求从 windows 身份验证转移,因此我重新配置 solution/web 配置等以允许匿名身份验证,并禁用 windows 身份验证。然而,我似乎在某个地方错过了一些东西。

我的 Web 应用程序现在在发布时运行良好,但我经常需要编辑 .vs\config\applicationhost.config 文件。 每当我在 visual studio 中打开解决方案时,配置文件默认为以下状态:

    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="false" />
                <windowsAuthentication enabled="true" />
            </authentication>
        </security>
    </system.webServer>

每次我在 visual studio 2017 年打开项目时,都需要进行这些编辑才能使我的 ctrl+F5 功能正常工作。

现阶段我不确定我是否应该查看 visual studio 或 IIS Express 中的某些设置,因此将不胜感激任何帮助!

我收到了 Microsoft 的 Bill H. 的以下通信,它解决了这个问题,在这里分享以防其他人遇到这个问题:

"The value is stored in the project file so that it can be applied when you first download/clone a project. You can change the value in the property grid - select the project and press F4 to see the property grid"