設置新的開發工作站,當我從Visual Studio 2008運行ASP.NET(MVC)應用程序時出現SecurityException。任何想法可能是什麼問題?SecurityException:請求AspNetHostingPermission類型的權限失敗
我訪問過SMB數據文件(這是一個共享的安裝爲Z :)我已經運行
caspol -m -ag 1 -url "\\server\share\" FullTrust -exclusive on
完整回溯給予了充分的信任,那就是:
Server Error in '/' Application.
Security Exception
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.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
System.Reflection.Assembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +42
System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +145
System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) +73
System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) +111
System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) +279Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
是的,我上午。你知道,如果在該鏈接的Web服務器引用IIS?因爲我正在使用Casini進行開發。 – Pablo 2009-10-28 06:51:00
該鏈接指向IIS,但我認爲Casini具有相同的限制。您是否嘗試將FullTrust權限授予遠程共享? – Espo 2009-10-28 06:55:49
我不懷疑卡西尼有相同的限制,我只是無法弄清楚如何解決它。您如何將FullTrust授予遠程共享? – Pablo 2009-10-28 07:05:33