IIS8.5 is automatically changing Physical Path property

别等时光非礼了梦想. 提交于 2019-12-19 08:48:10

问题


I have a couple of Applications added under my Default Website in IIS8.5 (simply http on port 80 IP=*)

They point to different physical paths (which are not nested) and this works fine after adding such an application. But after a while the Physical Path of one of the applications automagically changes to the physical path of another Application. Why? I have flushed my DNSCache and removed and added the Application once again, but something is changing the physical path of my configuration. What could be doing this? Could something be overriding my Application settings?


回答1:


I have 2 sites in 1 solution, and one of the site's physical path in IIS was "randomly" changing to the other site's physical path, and I had to manually fix it each time. I finally found a way to reliably reproduce this issue.

It turned out if SiteB's project was reloaded independent of the rest of the solution (for example, I pulled from source control and Visual Studio prompted "SiteB's project file has changed. Reload SiteB?"), the physical path in IIS would change! I could easily reproduce this by right-clicking the project in Visual Studio and selecting "Reload project." If I reloaded only SiteA or SiteB, rather than reloading the full solution, the IIS path would change accordingly.

So the trick to preventing this from happening in the future was to always "Reload all" when presented with the option, and could be flipped back by reloading SiteA independently, if needed.

I think if the solution is set to use IIS, VS will modify whichever site is specified as the default URL on project load. Or something to that effect.



来源:https://stackoverflow.com/questions/27544123/iis8-5-is-automatically-changing-physical-path-property

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