Re: System.Security.SecurityException {Beginner working with ASP.NET}



Hi,

seems like the server is runnning with partial trust.

What kind of database are you accessing?

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Hello, I am a student working on an ASP.NET assignment for my course.

I am using Visual Studio 2003.

All I have is a simple web form with a datagrid. I added a data
adapter and generated a dataset off a table on my schools server with
data. In the page_load I fill the data adapter, bind the data to the
grid and close the connection. I am able to preview the data set being
filled in the properties pane.

I get this exception when attempting to view my webform in IE6.

Security Exception
Exception Details: System.Security.SecurityException: Request failed.
Stack:
[SecurityException: Request failed.]
admin.UserManagementSummary.InitializeComponent() +0
admin.UserManagementSummary.OnInit(EventArgs e) in
usermanagementsummary.aspx.cs:36
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +2112
System.Web.UI.Page.ProcessRequest() +218
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecut
ionStep.Execute()
+179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean&
completedSynchronously) +87
Now all my page_load has is

private void Page_Load(object sender, System.EventArgs e)
{
dbCon.Open(); //Open connection
dbDA.Fill(dsDS1); //Fill the data adapter with the dataset
dgUsers.DataBind(); //Bind the grid
dbCon.Close(); //Close connection
}
I am using the following for this assignment.
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300
Appreciate any help



.



Relevant Pages

  • Re: IIS ASP.net Web Services Disconnected
    ... does show no exception, and it is a perfect run on the server-side. ... the connection idle for more than 1/2 hours, ... the server thinks the file is send without problem. ... At the client-side, it times out after 1.5 hours if nothing happen. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to reconnect to a db automatically?
    ... Dim MyConn as new Odbc.connection ... 'The connection could not be opened ... Catch ex as exception ... For instance if the sql server is just rebooting after an update, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: HttpWebRequest.GetRequestStream:Unable to connect to the remot
    ... System.Net.WebException Unable to connect to the remote server at ... Inner exception: System.Net.Sockets.SocketException Message: A connection ... executed on the web server when invoking a remote web service. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to reconnect to a db automatically?
    ... was tested at application launch to make sure it was valid and could ... 'The connection could not be opened ... Catch ex as exception ... For instance if the sql server is just rebooting after an update, ...
    (microsoft.public.dotnet.languages.vb)
  • Accessing Paradox Tables From C# Using ODBC
    ... I have added a Data Connection to the Paradox table in the Server ... I have also generated a data set from the data adapter. ...
    (microsoft.public.dotnet.general)