加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – System.Web.AspNetHostingPermission SecurityExcept

发布时间:2020-12-15 19:07:22 所属栏目:asp.Net 来源:网络整理
导读:我不知道有人可以帮助我一个问题,我遇到了试图让我的网站在Goddaddy上运行。 我试图获得无扩展的url重写工作使用ManagedFusion Rewriter( http://www.codeplex.com/urlrewriter/)不幸的是,我得到以下错误: Server Error in ‘/’ Application. Security E
我不知道有人可以帮助我一个问题,我遇到了试图让我的网站在Goddaddy上运行。
我试图获得无扩展的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

非常感谢提前。

解决方法

我在新的安装上也遇到同样的异常,将应用程序池标识更改为NetworkService / aspnet修复它。

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读