How can I create new applicationhost.config file i

2019-03-23 01:19发布

I had to delete my applicationhost.config, because VS 1012 didn't deal with him. How can I create it? thank you.

2条回答
趁早两清
2楼-- · 2019-03-23 01:52

Just run IISExpress and it will recreate the file for you. The exe is located at: "c:\Program Files\IIS Express\iisexpress.exe".

Hope this helps.

查看更多
成全新的幸福
3楼-- · 2019-03-23 02:00

After you deleted applicationhost.config you do not need to run iisexpress.exe manually, you can simply load your project in Visual Studio and run it. Visual Studio will take care of that plus it will change applicationhost.config with settings for that project specified in project Properties window (not mouse menu properties).

enter image description here

It will add corresponding override section at the bottom of applicationhost.config

<location path="...WebServices">
    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="false" />
                <windowsAuthentication enabled="true" />
            </authentication>
        </security>
    </system.webServer>
</location>
查看更多
登录 后发表回答