Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > System.Security.SecurityException {Beginner working with ASP.NET}

Reply
Thread Tools

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

 
 
AMT2K5
Guest
Posts: n/a
 
      03-10-2006
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.Htt pApplication+IExecutionStep.Execute()
+179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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

 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      03-10-2006
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.Htt pApplication+IExecut
> ionStep.Execute()
> +179
> System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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
>



 
Reply With Quote
 
 
 
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      03-10-2006
It also looks like there might be a try/catch block on the page that is
rethrowing an exception as the complete stack trace to the code that threw
the exception is not available. That is generally not a good thing from an
error handling perspective. Either don't catch at all or just use "throw"
instead of throwing the exception.

Joe K.

"Dominick Baier [DevelopMentor]" <>
wrote in message news:. com...
> 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.Htt pApplication+IExecut
>> ionStep.Execute()
>> +179
>> System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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
>>

>
>



 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      03-10-2006
to me it looks like partial trust, access or odbc and some full trust link
demand...

the error looks like that.

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

> It also looks like there might be a try/catch block on the page that
> is rethrowing an exception as the complete stack trace to the code
> that threw the exception is not available. That is generally not a
> good thing from an error handling perspective. Either don't catch at
> all or just use "throw" instead of throwing the exception.
>
> Joe K.
>
> "Dominick Baier [DevelopMentor]"
> <> wrote in message
> news:. com...
>
>> 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.Htt pApplication+IExec
>>> ut
>>> ionStep.Execute()
>>> +179
>>> System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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



 
Reply With Quote
 
AMT2K5
Guest
Posts: n/a
 
      03-10-2006
Thanks for the replies
Is this something I can fix on my end? I am able to preview the data
correctly being filled in the adapter in the properties pane, does this
mean that I do have the access rights to the data?

 
Reply With Quote
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      03-10-2006
Yeah, I think the same thing. I would just expect the stack trace to come
from SqlClient or OleDb. It seemed "cut off" to me, which tends to indicate
a "catch and rethrow" type of exception handling pattern. I hate those.

Sorry if I wasn't clear.

Joe K.

"Dominick Baier [DevelopMentor]" <>
wrote in message news:. com...
> to me it looks like partial trust, access or odbc and some full trust link
> demand...
>
> the error looks like that.
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> It also looks like there might be a try/catch block on the page that
>> is rethrowing an exception as the complete stack trace to the code
>> that threw the exception is not available. That is generally not a
>> good thing from an error handling perspective. Either don't catch at
>> all or just use "throw" instead of throwing the exception.
>>
>> Joe K.
>>
>> "Dominick Baier [DevelopMentor]"
>> <> wrote in message
>> news:. com...
>>
>>> 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.Htt pApplication+IExec
>>>> ut
>>>> ionStep.Execute()
>>>> +179
>>>> System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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

>
>



 
Reply With Quote
 
AMT2K5
Guest
Posts: n/a
 
      03-10-2006
I dont even have any try catch statement in my code. Brand new webform,
only 3 lines in my page_load()

 
Reply With Quote
 
AMT2K5
Guest
Posts: n/a
 
      03-10-2006
Could be my connection string, im checking it out.

 
Reply With Quote
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      03-10-2006
Really? Wow. And that was the whole stack trace? I'm not sure what throws
an exception from InitializeComponent. Is there any code in there?

The result you are getting looks a little strange to me. Maybe D. knows...

Joe K.


"AMT2K5" <> wrote in message
news: oups.com...
>I dont even have any try catch statement in my code. Brand new webform,
> only 3 lines in my page_load()
>



 
Reply With Quote
 
AMT2K5
Guest
Posts: n/a
 
      03-10-2006
Weird, I just tried doing what I wanted to do with a simple
SQLDataReader and it works perfectly. Why cant I use a dataset and
adapter to accomplish the same thing using the Wizard?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
response.redirect is not working but server.transfer is working gaurav tyagi ASP .Net 14 01-20-2006 04:22 AM
wifi not working on new hp, or not working after live update =?Utf-8?B?RHJhZ29ueA==?= Wireless Networking 1 10-01-2005 11:17 PM
ASP.NET client-side validation working, but button click not working Alan Silver ASP .Net 1 08-02-2005 03:50 PM
Cookies working on intranet but NOT working on Internet Martin Heuckeroth ASP .Net 5 04-01-2005 01:37 AM
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57