详细错误如下:
安全性异常 
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。 异常详细信息: System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。源错误: 
[没有相关的源行]
 源文件: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\gorequestweb\a9108fd7\65397a1f\App_Web_1vjcutbk.0.cs    行: 0 堆栈跟踪: 
[SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。]
   System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) +665
   System.Diagnostics.EventLog.SourceExists(String source, String machineName) +104
   System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName) +75
   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +205
   System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +87
   System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type) +14
   Microsoft.Practices.EnterpriseLibrary.Logging.Distributor.DistributorEventLogger.WriteToLog(Exception exception, Severity severity) +84
   Microsoft.Practices.EnterpriseLibrary.Logging.Distributor.DistributorEvents.LogProcessLogException(LogEntry logEntry, Exception ex) +150
   Microsoft.Practices.EnterpriseLibrary.Logging.Distributor.LogDistributor.ProcessLog(LogEntry log) +84
   Microsoft.Practices.EnterpriseLibrary.Logging.Distributor.InProcLogDistributionStrategy.SendLog(LogEntry logEntry) +15
   Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.SendMessage(LogEntry logEntry) +91
   Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter.Write(LogEntry log) +72
   Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(LogEntry log) +23
   Beyondsoft.GoRequest.Web.WebBase.WebBase_Error(Object sender, EventArgs e) +748
   System.Web.UI.TemplateControl.OnError(EventArgs e) +8693002
   System.Web.UI.Page.HandleError(Exception e) +84
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6776
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\gorequestweb\a9108fd7\65397a1f\App_Web_1vjcutbk.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75往服务器上搭了一下午硬是没搭上,无语了,各位弟兄们帮帮忙吧!感激不尽!感激不尽!

解决方案 »

  1.   

    权限
    将ASPNET帐号添加到管理员组参考
      

  2.   

    asp.net账号没有写入日志权限,加上就ok!
      

  3.   

    也遇到了这个问题,同问,已经加了ASPNET到administrator用户组,还是不行,报安全性异常错误
      

  4.   

    程序目录和C:\WINDOWS\Temp目录需要添加NetWord Service权限
      

  5.   

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe
    重新注册下,试试
      

  6.   

    重注册之后 给asp.net用户所有权限试试
      

  7.   

    我出现这问题的情况是这样:项目是之前项目的改造升级,之前项目没问题,改后的项目在本地运行也没问题,传到服务器就是这种状况,折腾很久了,应该还是权限问题,但是不知道具体是哪一块的权限,该怎么设置,能赋予的权限基本都赋予了。ASPNET账号假如administrator组,eventlog的读权限,都有了,还是出现安全性异常。
      

  8.   

    你的程序里有操作系统日志的代码?
    你发布到IIS5才要ASP权限,IIS6需要NetworkService的权限。从你的错误上看似乎不在这个问题上,而是你的代码好像想写日志到系统日志上缺乏相应的权限吧
      

  9.   

    各位,支个招把,无语了,就是配不到服务器上去。帮忙
    求助
    求助
    求助
    求助
    求助
    求助
    ~~~~(>_<)~~~~