Frage

Ich entwickle einen Antrag in MVC3 ( http://www.colombiastrolley.com/sitrolley).In meinem Computer läuft es richtig, aber wenn ich ihn auf den Server hochladen (einen Hosting-Dienst), erhalte ich diesen Fehler:

Parser-Fehlermeldung: Es ist ein Fehler, einen Abschnitt zu verwenden, der als zugelassene Definition registriert= 'machinetoapplication' über Anwendungsniveau hinausgeht.Dieser Fehler kann durch ein virtuelles Verzeichnis verursacht werden, das nicht als Anwendung in IIS konfiguriert ist.

Ich weiß, dass es ein sehr gängiger Fehler ist, aber ich habe es noch nicht repariert.

Error Capture

War es hilfreich?

Lösung

Some config sections are only allowed at the "root" of the application, then authentication section is one of them.

You need to configure IIS to run your your site as an application, not a sub-directory in an existing application.

For IIS 7+, right click the directory that contains your web application, and select "Convert to Application".

EDIT:

Arie van Someren is right. Looking carefully at your error, you want the <authentication> configuration to be in the web.config one level up, not the web.config in Views.

Andere Tipps

I had the same problem. I solved it by deleting the obj folder that appeared after doing a "Build > Publish".

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top