J
Jeff
Rather than declaratively specifying that a particular aspx page is to be
secured by Forms Authentication, as in the following code from Web.config:
<location path="mySecuredPage.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
Is it possible to programmatically determine if/when a page is to be secured
by Forms Authentication (i.e., at runtime per my own custom logic)?
What I ultimately want is the ability to require users to be authenticated
before viewing a page (or to not be authenticated before viewing the same
page) based on the data that is to appear on the page.. The page displays
data that can be viewed by either (1) all/unauthenticated users, or (2) only
authenticated users. I don't want to implement two pages (one secured
declaratively by Forms authentication and the other not secured) and
associated link issues in order to provide this functionality.
Thanks.
secured by Forms Authentication, as in the following code from Web.config:
<location path="mySecuredPage.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
Is it possible to programmatically determine if/when a page is to be secured
by Forms Authentication (i.e., at runtime per my own custom logic)?
What I ultimately want is the ability to require users to be authenticated
before viewing a page (or to not be authenticated before viewing the same
page) based on the data that is to appear on the page.. The page displays
data that can be viewed by either (1) all/unauthenticated users, or (2) only
authenticated users. I don't want to implement two pages (one secured
declaratively by Forms authentication and the other not secured) and
associated link issues in order to provide this functionality.
Thanks.