本文介绍了试图在Goddaddy使用ManagedFusion重写时System.Web.AspNetHostingPermission SecurityException异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道,如果有人可以帮助我走出我遇到试图让我的网站和运行上Goddaddy的问题。
我试图让无扩展名的URL重写工作使用ManagedFusion重写()不幸的是,我发现了以下错误:

I wonder if someone could help me out with an issue I'm experiencing trying to get my site up and running on Goddaddy.I'm trying to get extension-less url rewriting working using the ManagedFusion Rewriter (http://www.codeplex.com/urlrewriter/) Unfortunately I'm getting the following error:

在'/'应用程序的服务器错误。
安全异常
说明:应用程序试图执行不是由安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系或更改配置文件中的应用程序的信任级别。

Server Error in '/' Application.Security ExceptionDescription: 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.

异常详细信息:System.Security.SecurityException:申请类型的权限'System.Web.AspNetHostingPermission,系统,版本= 2.0.0.0,文化=中性公钥= b77a5c561934e089'失败

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.

源错误:

当前Web请求的执行过程中生成了未处理的异常。可以使用异常堆栈跟踪下面确定有关异常原因和位置信息。

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, 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

Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434

我在集成模式下使用IIS 7 runnung。我按照这里的自述文件中的说明修改我的web.config文件:
<一href=\"http://www.$c$cplex.com/urlrewriter/Release/ProjectReleases.aspx?ReleaseId=22618\">http://www.$c$cplex.com/urlrewriter/Release/ProjectReleases.aspx?ReleaseId=22618

I'm runnung using IIS 7 in integrated mode. I've modified my web.config file by following the instructions in the readme file here:http://www.codeplex.com/urlrewriter/Release/ProjectReleases.aspx?ReleaseId=22618

非常感谢在前进。

推荐答案

我打这个相同的异常上一个新的安装,改变了应用程序池标识为网络服务/ ASPNET固定它。

I hit this same exception on a new install, changing the App pool identity to NetworkService / aspnet fixed it.

此外,在启用应用程序池加载用户配置文件也工作。

Additionally, enabling Load User Profile on the app pool also worked.

这篇关于试图在Goddaddy使用ManagedFusion重写时System.Web.AspNetHostingPermission SecurityException异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 17:41