我试图获得无扩展的url重写工作使用ManagedFusion Rewriter( http://www.codeplex.com/urlrewriter/)不幸的是,我得到以下错误:
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.
源错误:
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.
堆栈跟踪:
[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission,PublicKeyToken=b77a5c561934e089' Failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand,StackCrawlMark& stackMark,Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +59 System.Web.Hosting.HostingEnvironment.get_ApplicationID() +61 IIS7Injector.TraceManager.TraceEvent(TraceEventType eventType,String message) +62 IIS7Injector.ConfigManager.IsSkippedUrl(HttpRequest request,String ContentType) +38 IIS7Injector.InjectedContentStream.Write(Byte[] buffer,Int32 offset,Int32 count) +153 ManagedFusion.Rewriter.FormActionFilter.Write(Byte[] buffer,Int32 count) +485 System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering,IIS7WorkerRequest wr) +265 System.Web.HttpResponse.FilterOutput() +80 System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +54 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) +64
版本信息:Microsoft .NET Framework版本:2.0.50727.1434; ASP.NET版本:2.0.50727.1434
我runnung使用IIS 7在集成模式。我修改了我的web.config文件,按照readme文件中的说明在这里:
http://www.codeplex.com/urlrewriter/Release/ProjectReleases.aspx?ReleaseId=22618
非常感谢提前。