当前位置:编程学习 > C#/ASP.NET >>

如何在配置文件中更改该应用程序的信任级别?要怎么解决?

“/userportal”应用程序中的服务器错误。
--------------------------------------------------------------------------------

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

异常详细信息: System.Security.SecurityException: 不允许所请求的注册表访问权。

源错误: 

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

堆栈跟踪: 


[SecurityException: 不允许所请求的注册表访问权。]
   Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
   System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex) +443
   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +347
   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category) +21
   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID) +15
   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type) +11
   Ruijin.Portal.Business.AnonymousUser.Register(String LoginName, String UserName, String NickName, String Password, String Gender, String Area, Int32 UserType, String Question, String Answer, String Email, String Address, String ZipCode, String Phone, String MobilPhone, Int32 IDType, String IDNumber, Int32 DiagnoseType, String DiagnoseID, String CSNY, String yydm, Int32 viplevel, String QueryPwd) in C:\RuijinPortalCode\Business\AnonymousUser.cs:116
   Ruijin.Portal.WebApps.InternetUserPortal.Register_WebService_Clone.UserRegister_HIS.BtnOK_Click(Object sender, ImageClickEventArgs e) in C:\RuijinPortalCode\InternetUserPortal\Register_WebService_Clone\UserRegister_HIS.aspx.cs:470
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +109
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +69
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +2174
   System.Web.UI.Page.ProcessRequest() +217
   System.Web.UI.Page.ProcessRequest(HttpContext context) +18
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

 


--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2443; ASP.NET 版本:1.1.4322.2460  --------------------编程问答-------------------- <identity impersonate="true" userName="administrator" password="密码"/>  
网站的应用程序池的标识改为本地系统进行测试
修改\Machine.config文件ProcessModel段中的UserName,   
--------------------编程问答-------------------- 欧。。。步骤能不能具体点。。。我是电脑白痴。。。看不懂。。。
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,