2011-01-22 5 views
3

NHibernateを使用するWebアプリケーションをサーバーに展開しました。アプリケーションはコンパイルされ、ローカルのdevマシンで正常に動作しますが、新しいサーバーにNHibernateに問題があります。次のエラーが表示されます。展開されたWebアプリケーションでNHibernateの "セキュリティ"の問題

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=tokenkeyhere' failed.

設定ファイルのアプリケーションの「信頼レベル」を変更することを推奨します。どのように私はそれを正確に行うのですか?私はNHibernate Webアプリケーションを初めて配備したので、私は迷っています。

答えて

3

最近、私たちはこれを多く見てきました。ここでrunning NHibernate in medium trust

上のリンクはこれは私が別の信頼レベルで見た中で最も簡潔な説明です:記事からTrust Levels Demystified

- Full trust – your code can do anything that the account running it can do. 
- High trust – same as above except your code cannot call into unmanaged code. i.e. Win32 APIs, COM interop. 
- Medium trust – same as above except your code cannot see any part of the file system except its application directory. 
- Low trust – same as above except your code cannot make any out-of-process calls. i.e. calls to a database, network, etc. 
- Minimal trust – code is restricted from anything but the most trival processing (calculating algorithms). 
+0

おかげで、私はこの打撃を与えるだろうそれがどのように進むのかを教えてください。 –

+0

それはトリックをした、アレックス、もう一度ありがとう! –

+0

よく聞いてください - 実際にはまだ中程度の信頼環境には展開していません:) – AlexCuse

関連する問題