質問

MVC3(href="http://www.colombiatrolley.com/www.colombiatrolley.com/japan/www.colombiatrolleow.com/www.colommiatrollow noreferrer"> http://www.colombiatrolley.com/sitrole )。マイコンピュータでは正しく動作しますが、サーバーにアップロードしたとき(ホスティングサービス)私はこのエラーを取得します:

パーサーのエラーメッセージ:登録されているセクションをAllowDefinition= 'MachineToApplication'を超えて使用するエラーです。このエラーは、IISのアプリケーションとして設定されていない仮想ディレクトリが原因で発生する可能性があります。

私はそれが非常に一般的なエラーであることを知っていますが、私はまだそれを修正していません。

エラーキャプチャ

役に立ちましたか?

解決

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