By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Does anyone have experience with code access security?

P: n/a
I've looked through the MSDN documentation on code access security and
can not seem to find an answer to my question.

I have a class XYZCorpWebPage that uses System.Web.UI.Page as it's
base class. I want to make it so that the web server will throw an
exception/deny runtime rights to any WebForm derived from
System.Web.UI.Page, but I want to allow runtime rights on
XYZCorpWebPage (I want to force our developers to use XYZCorpWebPage
as their base class).

Can this be done using the .NET Configuration Wizards? I only see
access to increase trust in an Assembly and I'm not sure how it will
resolve the conflict.
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ramzey,

You can't do it. The reason for this is that you would have to be able
to modify System.Web.UI.Page to modify the permissions it demands. You
don't have access to this, so you can't change it.

What I would do is create a class that implements IHttpHandler that will
then create the appropriate class and check to make sure that it derives
from your type.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Ramzey" <je**********@hotmail.com> wrote in message
news:d3**************************@posting.google.c om...
I've looked through the MSDN documentation on code access security and
can not seem to find an answer to my question.

I have a class XYZCorpWebPage that uses System.Web.UI.Page as it's
base class. I want to make it so that the web server will throw an
exception/deny runtime rights to any WebForm derived from
System.Web.UI.Page, but I want to allow runtime rights on
XYZCorpWebPage (I want to force our developers to use XYZCorpWebPage
as their base class).

Can this be done using the .NET Configuration Wizards? I only see
access to increase trust in an Assembly and I'm not sure how it will
resolve the conflict.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.