Pergunta

Estou desenvolvendo um pedido no MVC3 ( http://www.colombiatrolley.com/sitrolley).>).No meu computador, é executado corretamente, mas quando eu carrega para o servidor (um serviço de hospedagem) eu recebo este erro:

Mensagem de erro analisador: é um erro para usar uma seção registrada como AllowDefinition= 'MachinetoApplication' além do nível do aplicativo.Este erro pode ser causado por um diretório virtual não sendo configurado como um aplicativo no IIS.

Eu sei que é um erro muito comum, mas ainda não consertei.

captura de erro

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top