authenticating users to view certain pages

bchukkapalli

New member
Joined
Jun 3, 2004
Messages
1
Programming Experience
1-3
Hi,

I'm developing an Intranet site using asp.net in VB.net and I'm using windows authentication so no user has to be challenged. However, I need to restict access to some pages. Could anyone help me how do I do that. I'm using a virtual directory. Any help is really appreciated.

Thanks a bunch.
 
You can get the username of the person by using the

Dim strUsername as string = User.Identity.Name


Once you have that, you have a few options such as creating a table or two to set up the permissions and check with a simple query which is probaly your best bet if you'll have mutliple pages with different permissions.



If you need more info let me know
 
You need to look at the <authorization> section of the web.config file. From there you can restrict access to certain pages/users
 
Back
Top