問題タブ [reflectionpermission]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
asp.net - IIS に Reflection Permission を追加する方法、または web.config に追加する方法は?
csvファイルの読み取りにFileHelpersを使用していますが、VS 開発サーバーから IIS に切り替えるまでは問題ありませんでした。これが機能するように、誰も方法を知っていますか?
nhibernate - NHibernate + Remoting = ReflectionPermission 例外
完全信頼環境のマシン (実際には開発マシン) で NHibernate を Remoting と共に使用する際の問題に対処しています。
この問題は、サーバーから以前に取得したオブジェクトをパラメーターとして送信しようとすると発生します。このオブジェクトには、プロパティの 1 つに NHibernate Proxy が含まれています (レイジー プロキシ)。
私たちは開発マシンにいるので、Web アプリの信頼レベルに制限はありません (Full に設定されています)。プラスとして、NHibernate と Castle のアセンブリを CAS で完全に信頼するように構成しました ( IIS のリモート アプリには完全な信頼レベルがあるため、必要ありません)。
この例外を引き起こしている可能性があることを誰かが知っていますか? 以下スタックトレース。
前もって感謝します。
asp.net-mvc - 中程度の信頼環境で Ninject 2.2、Fluent NHibernate を使用する場合の ReflectionPermission の問題
私は(Nugetパッケージから) Ninject 2.2とFluent NHibernate 1.3(フードの下のNHibernate v3.2)を使用していますが、レンガの壁にぶつかりました。
データベースやマッピングなどを指すために Fluent config を使用しています。
< trust level="Medium" />を設定してホスティングプロバイダーをミラーリングし、barf を開始するまで、コードはローカルボックスで美しく機能します。
問題の行は、このコード ブロックの 2 番目の行です。
私が受け取った例外:「...タイプ 'System.Security.Permissions.ReflectionPermissionのアクセス許可のリクエスト....失敗しました」
誰か提案はありますか?これまでの私の調査では、古いバージョンの Ninject と NHibernate に基づく古い情報か、X を逆コンパイルして Y を解放することを含む解決策しか見つかりませんでした。
c# - ユーザーセッションの読み取り中にNULL参照例外(反射)
参照ReadingAllUsers Sessionを使用してアクティブなセッションを読み取るためのコードを実装し、ASP.NET内のすべてのアクティブなセッションのリストを取得しました。
ローカルシステム(WindowsXPおよびWindows7)では正常に動作しています。Windows Server 2003(IISバージョン6)でアプリケーションをホストしているときに、行にNULLオブジェクト参照エラーが表示されます
これは、IISに関連するアクセス許可の問題または信頼レベルの設定に関連するものですか?誰かがそのような問題に遭遇したことを知らせてください。どんな助けでも非常に高く評価されます。
c# - Restrict reflection on private literal fields
I'm trying to build a sandbox using an app-domain to isolate execution of potentially bad code.
Among other things I'd like to restrict reflection.
I'm building the sandbox this way:
It's working fine with private instance fields and private properties: any attempts to access them in the sandbox is rejected by the runtime.
But I've noticed that it doesn't works with literal fields (const in C#): it's always possible to get the value of a literal field, even if private:
password and Password are correctly protected but any code can get the value of PASSWORD with basic reflection:
I'd like to understand the rationales behind this behavior: is it because a literal value would always be "easily" visible in an assembly so preventing reflection is a losing battle, or because a final value is not really "invoked" so there is no security check or...?
This example is not really relevant, because a password would not be shared, but imagine the secret value is a salt value used for cryptography or something like that...
Thanks for your help.
c# - アプリケーション C# に RestrictedMemberAccess で ReflectionPermission を付与する方法
アセンブリで GetTypes を呼び出すと、内部クラスとプライベート クラスが表示されません。RestrictedMemberAccess を追加することで内部クラスとプライベート クラスを取得できると読みましたが、その方法がわかりません。
助けてくれてありがとう。