.NET Security Exception - does anyone know why this error occurs

From: Rohan (rohanf@vic.bigpond.net.au)
Date: 09/10/02


From: "Rohan" <rohanf@vic.bigpond.net.au>
Date: Tue, 10 Sep 2002 02:27:09 -0700


Has anyone seen the following error on the Visual
Studio .NET Web Forms C# Walkthrough. This is running with
Full Administrator rights and I've tried to give the
assembly Full Trust but it still does not work. Does
anyone out there have any idea what is causing this?

With regards,

Rohan

------------------------------

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:
Requested registry access is not allowed.

Source Error:

Line 14: public void FillDataSet(myDataSet
dSet)
Line 15: {
Line 16: sqlDataAdapter1.Fill(dSet);
Line 17: }
Line 18:
 

Source File: c:\inetpub\wwwroot\mywebform\component1.cs
Line: 16

Stack Trace:

[SecurityException: Requested registry access is not
allowed.]
   System.Data.SqlClient.SqlConnection.Open() +761
   System.Data.Common.DbDataAdapter.QuietOpen
(IDbConnection connection, ConnectionState& originalState)
+44
   System.Data.Common.DbDataAdapter.Fill(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +98
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,
Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
+38
   MyWebForm.Component1.FillDataSet(myDataSet dSet) in
c:\inetpub\wwwroot\mywebform\component1.cs:16
   MyWebForm.WebForm1.Page_Load(Object sender, EventArgs
e) in c:\inetpub\wwwroot\mywebform\webform1.aspx.cs:33
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +29
   System.Web.UI.Page.ProcessRequestMain() +2077
   System.Web.UI.Page.ProcessRequest() +118
   System.Web.UI.Page.ProcessRequest(HttpContext context)
+18
   System.Web.CallHandlerExecutionStep.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously) +87

 

-----------------------------------------------------------
---------------------
Version Information: Microsoft .NET Framework
Version:1.0.3705.0; ASP.NET Version:1.0.3705.0



Relevant Pages

  • ThreadAbortException
    ... srcTable, IDbCommand command, CommandBehavior behavior) ... at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, ...
    (microsoft.public.dotnet.framework.aspnet)
  • ThreadAbortException from DbDataAdapter.Fill
    ... srcTable, IDbCommand command, CommandBehavior behavior) ... at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, ...
    (microsoft.public.dotnet.framework.adonet)
  • Connection Pooling randomly throwing exceptions
    ... DataTabledatatables, Int32 startRecord, Int32 maxRecords, String srcTable, ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ... (Exception from HRESULT: ...
    (microsoft.public.dotnet.framework.adonet)
  • SQLConnection Help
    ... System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ... System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ...
    (microsoft.public.dotnet.framework.aspnet)