#VS2017 – ASP.Net, IIS Express, #OneDrive and the error “The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project”

Hi!

In recent months OneDrive has enabled a new feature that is great [Files On Demand]. If you have terabytes of information in OneDrive, this is a great way to optimize space and synchronization between multiple devices..

I1

Well, another feature that has OneDrive for a while is to automatically synchronize som of the information of your Windows Profile between different devices. For example, if you use 2 devices with the same OneDrive account, you can configure the account so that all the files that you have on your Desktop and in your Documents are synchronized between these devices.

I2

In my case, I usually develop on a PC with enough power and then I have my “crappy SurPro4” for demos and other sessions. I have enabled the option to synchronize the Desktops for a long time, and I think it will be a good idea to synchronize the also my Documents between this 2 machines.

Well, While I’m practicing a couple of sessions on Azure and Amazon Alexa I realized that when I opened a Web project on my Surface Pro 4 and when trying to load the same in Visual Studio 2017, I found this error

—————————

Microsoft Visual Studio

—————————

The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project [$ProjectName].

Filename: redirection.config

Error: Cannot read configuration file

—————————

OK  

—————————

This got me on the nerves for a while, because the values in this file were correct. However, Visual Studio 2017 could not load ASP.Net projects. In a moment of lucidity, I realized that these files were not being loaded from [% USER_PATH] but from OneDrive

I3

And of course, it seems that IIS Express doesn’t get along with Onedrive. At this time the solution went through

  • Cancel the synchronization of the document folder
  • Configure my projects to use IIS instead of IIS Express

As the 2nd option is always much more practical at the time of work, I choose this one.  I’ve done this and everyone’s happy!

Happy Coding!

Greetings @ Toronto

El Bruno

References

Share this:

  • More

Like this:

Like

Loading…