更怪的错误不允许所请求的注册表访问权
更怪的错误不允许所请求的注册表访问权 在配置完.nettier后出现了更怪的错误
安全性异常 说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。
异常详细信息: System.Security.SecurityException: 不允许所请求的注册表访问权。
源错误:
行 195:else行 196:{行 197:reader = database.ExecuteReader(commandWrapper);行 198:}行 199:}
源文件: D:\web\gtgaweb\DataAccessLayer\SqlClient\SqlBMProviderBase.cs 行: 197
堆栈跟踪:
[SecurityException: 不允许所请求的注册表访问权。] Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473 System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex) System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category) System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID) Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.EventLogger.Log(String message) Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.FireEvent(String message) Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataServiceEvent.FireAuxEvent(String message) Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.FireEvent(String connectionString) Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String connectionString) Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String connectionString) Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper command) gtgaweb.DataAccessLayer.SqlClient.SqlBMProviderBase.GetAll(TransactionManager transactionManager, Int32 start, Int32 pageLength) in D:\web\gtgaweb\DataAccessLayer\SqlClient\SqlBMProviderBase.cs:197 gtgaweb.DataAccessLayer.SqlClient.SqlBMProviderBase.GetAll(Int32 start, Int32 pageLength) in D:\web\gtgaweb\DataAccessLayer\SqlClient\SqlBMProviderBase.cs:160 gtgaweb.DataAccessLayer.Bases.BMProviderBase.GetAll() in D:\web\gtgaweb\DataAccessLayer\Bases\BMProviderBase.cs:91 Web.WebForm1.Page_Load(Object sender, EventArgs e) in D:\web\gtgaweb\Web\WebForm1.aspx.cs:29 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain() System.Web.UI.Page.ProcessRequest() System.Web.UI.Page.ProcessRequest(HttpContext context) System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
版本信息: Microsoft .NET Framework 版本:1.1.4322.2300; ASP.NET 版本:1.1.4322.2300
同样的配置,我可以用windows application是可以访问的,没有问题,所以我认为错误要么是配置不对,要么是权限分配得不对。