Allow “localhost” to run in iisexpress when web.config contains ipSecurity permissions

谁说胖子不能爱 提交于 2019-12-05 00:20:39
AbeyMarquez

I just ran into the same situation. I googled around and found that all you have to do is edit the applicationhost.config file for IIS Express found here:

%userprofile%\Documents\IISExpress\config\applicationhost.config

Open it up and look for the ipSecurity section that is inside the system.webServer section and change overrideModeDefault from "Deny" to "Allow". You do not need to add the IIS IP Security from Windows Features.

<sectionGroup name="system.webServer">
  ...
  <section name="ipSecurity" overrideModeDefault="Allow" />
  ...
</sectionGroup>

Hope this helps!

NOTE: For Windows 10 and Visual Studio 2015 (or later version) please note that the ApplicationHost.config file has been relocated to the .vs\config folder in your project's folder hierarchy.

Add 127.0.0.1 to your allowed ips like so:

<add allowed="true" ipAddress="127.0.0.1" />

Thanks to @AbeyMarquez, I thought your comment warranted more attention as it solved my problem. Thanks!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!