1

I recently bought a new computer. I moved the drives from my old computer to the new one, installed everything I needed to and opened my project. Now I'm trying to run my project in IIS express but it displaying an error specifying an html output as log file.

When I look at the html problem, it's a 500 error message generated by what looks likes an IIS page. It's saying that the config file cannot be found:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid

Config File
\\?\F:\Development\MyProject\API\web.config  

When I switched to the new machine drive letters were changed, so the code I'm running is no longet on drive F like in the message above - it's now on a different drive. I've looked in my code - I have no reference anywhere to a specific path.

I've tried to do clean and rebuild but it doesn't work.

If I look inside files for the path I see that the DLLs are compiled with PDB file path inside them. Why is that? And what happens later on on production?

Also, how do I fix this problem? why does it keeps looking for old location?

developer82
  • 13,237
  • 21
  • 88
  • 153

2 Answers2

1

I'm fairly sure the IIS Express metabase still has the old path configured for this site. Please see the following answer for how to locate the metabase file (it's usually here: \Documents\IISExpress\config\applicationhost.config):

Where is the IIS Express configuration / metabase file found?

I'm not sure what the most correct way is to correct the problem, but you should be able to manually edit this file and update the "physicalPath" attribute for your site to the correct path to resolve this problem.

Community
  • 1
  • 1
jbsmith
  • 1,616
  • 13
  • 10
0

I don't know the exact cause of my problem, but the solution was to delete all bin directories from all project folders and re-compile.

To delete the bin directory from all my project I wrote the following PowerShell script:

Get-ChildItem -Path . -Filter *bin* –Recurse | Remove-Item -Recurse -Confirm
developer82
  • 13,237
  • 21
  • 88
  • 153