Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

IIS/Visual Studio doesn't update where the web.config is if you move the root folder of the project

$
0
0

Hello, i found a bug.

If i create a new asp.net vnext project and put it in the desktop, and then debug/run it, then it all works.

But if i then move the folder to another place, then iis/visual studio is not updated and if i debug, then it will try to find the web.config at the original place that it was created. So that means i get an error 500.17 and it says its trying to find the web.config and gives me the path that it is trying to look for.

And that path obviously doesn't exist because i moved the whole project to another place.

To create the scenario, do this:

  1. Create a new asp.net v.next project, call it HelloWorld,  and put it in the desktop
  2. Debug it. (it works as expected)
  3. Now close it.
  4. Create a new empty folder on the desktop, and call it MyNewFolder
  5. Put the HelloWorld folder from the desktop into the MyNewFolder
  6. Open the project again, and try to debug it.
  7. You get an error and it says that it cant find the web.config. It is trying to look into the "desktop/helloworld...", but the web.config is now inside the "desktop/mynewfolder/helloworld..."
  8. To fix it, move the helloworld back to the desktop, and now, IIS/Visual studio can find the web.config again.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>