我收到以下異常,試圖在Cassini 3.5.0.2上瀏覽中等信任的ASP.NET MVC應用程序(使用Linq-to-SQL):中等信任度的Cassini異常ASP.NET MVC應用程序使用Linq-to-SQL
Could not load file or assembly 'Cassini, Version=3.5.0.2, Culture=neutral, PublicKeyToken=da0fefd60d522a7d'
or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
與內部異常:
Execution permission cannot be acquired.
Stack trace:
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset,
PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset,
PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)
同樣的應用軟件可在IIS7及內部VS2008 web服務器上。 Cassini在沒有使用Linq-to-SQL的ASP.NET MVC應用程序中沒有任何問題。
ASP.NET MVC應用程序和Linq-to-SQL存儲庫項目都應用[assembly: System.Security.AllowPartiallyTrustedCallers]
以便在中等信任下工作。
有沒有人有關於這個問題的任何線索?
EDIT
的拋出異常在這條線從Server.cs
:
return appManager.CreateObject(appId, hostType, virtualPath, physicalPath, false);