"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level."

StackOverflow https://stackoverflow.com/questions/22511982

Domanda

I tried to enable view compilation in build time by setting this in the csproj file of my project:

<MvcBuildViews>true</MvcBuildViews>

And cleaned the project.

Then an error message started to show up on build time.

Error 10 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\projekt\FooBar\FooBar.MVC\obj\myname\package\packagetmp\web.config 38 FooBar.MVC

When clicking the error message, I am navigated to this place in web.config:

<authentication mode="Forms">
  <forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>

Why?

È stato utile?

Soluzione

Try removing the obj folder and try again. If you cannot see the obj folder you'll need to show all hidden files.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top