我想知道是否有人可以帮助我解决我在尝试让我的网站在 Goddaddy 上运行时遇到的问题。我正在尝试使用 ManagedFusion Rewriter ( http://www.codeplex.com/urlrewriter/ ) 使无扩展名的 url 重写工作 不幸的是,我收到以下错误:
“/”应用程序中的服务器错误。安全异常描述:应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请联系您的系统管理员或在配置文件中更改应用程序的信任级别。
异常详细信息:System.Security.SecurityException:请求“System.Web.AspNetHostingPermission,System,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”类型的权限失败。
源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
堆栈跟踪:
[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, 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 offset, 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
我在集成模式下使用 IIS 7 运行。我已按照此处自述文件中的说明修改了我的 web.config 文件:http: //www.codeplex.com/urlrewriter/Release/ProjectReleases.aspx? ReleaseId=22618
非常感谢提前。