profdotnet,
Actually this is a generic ASP.NET post and probably should have been posted
to the ASP.NET group, not the C# language group.
Hard - coded values in the web.config are just a convenience and are not
designed to be "accessed programmatically". I think what you really want to
do here is set up forms authentication with roles against a data store (such
as SQL Server).
There are a number of articles that show how to do this, including one I
wrote some time ago here:
http://www.eggheadcafe.com/articles/20020906.asp
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"profdotnet" wrote:
Below is the code of web.config file:
<configuration>
<system.web>
<authentication mode="Forms" />
<authorization>
<allow users="Admin"/>
<deny users="Jack,Mary" />
<deny users="?">
</authorization>
</system.web>
</configuration>
I wanna access the deny and allow tag values and authenticate the
users.
Pl. let me the piece of code to work over here.
Thanks for ne kind of pointers too (I did google it myself also)