Вопрос

Я разрабатываю приложение в MVC3 ( http://www.colombiatrollley.com/sitrolley).На моем компьютере он работает правильно, но когда я загружаю его на сервер (хостинг-сервис), я получаю эту ошибку:

Обзор ошибки анализа: Это ошибка для использования раздела, зарегистрированного как allowdefinition= 'MachinetoApplication' за пределами уровня приложений.Эта ошибка может быть вызвана виртуальным каталогом, не настраиваемым в качестве приложения в IIS.

Я знаю, что это очень распространенная ошибка, но я еще не исправил его.

Ошибка Capture

Это было полезно?

Решение

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.

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top