Relative Root with ASP.NET Visual Studio Debugger

I am working on an ASP.NET project that is physically located in C: \ Projects \ MyStuff \ WebSite2. When I run the application with the Visual Studio debugger, it seems that the embedded web server believes that "C: \ Projects \ MyStuff \" is the relative root, not "C: \ Projects \ MyStuff \ WebSite2". Is there a web.config parameter or something that will allow tags to be displayed correctly, such as <img src='/img/logo.png' />without resorting to certain ASP.NET tags, for example <asp:image />? If I code the debugger features, then when I upload to the IIS server, everything is off.

How do you resolve this?

+3
source share

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


All Articles