IIS8.5 Automatically Modifies the Physical Path Property

I have several applications added under my default site in IIS8.5 (just http on port 80 IP = *)

They point to different physical paths (which are not nested), and this works great after adding such an application. But after some time, the physical path of one of the applications automatically changes to the physical path of another application. What for? I deleted my DNSCache and uninstalled and added the application again, but something is changing the physical path of my configuration. What can be done? Can something override my application settings?

+5
source share
1 answer

I have 2 sites in 1 solution, and one of the physical paths of the site in IIS was "randomly" changed to the physical path of another site, and I had to manually fix it every time. Finally, I found a way to reliably reproduce this problem.

It turned out that if the SiteB project was reloaded regardless of the rest of the solution (for example, I pulled it out of the source control and Visual Studio asked "the SiteB project file has changed. Reload SiteB?"), The physical path in IIS changed! I could easily reproduce this by right-clicking on a project in Visual Studio and selecting "Update Project". If I reloaded only SiteA or SiteB, and did not reload the full solution, the IIS path would change accordingly.

So the trick that prevented this from happening in the future was to always โ€œreset everythingโ€ when it was presented with the option, and can be discarded by reloading SiteA independently if necessary.

I think that if the solution is configured to use IIS, VS will change whichever site is listed as the default URL for loading the project. Or something like that.

+2
source

Source: https://habr.com/ru/post/1209435/


All Articles