Adding Windows Security to ascx

A

Arco

I have an application that is growing and requires Windows role based
security built into a navagation user control. I currently have the
security in the aspx forms with the Web.config file authorization and
authentication accessing roles and it is working.

I've created a user control, but unlike the aspx forms, the "Users" class
that I employ in the forms (read: User.IsInRole("someRole")) is not
available in the ascx user control. Adding: Imports System.Security still
does not allow me us use the "User" class.

Any ideas on what code I am missing?
 
A

Arco

I get to answer my own question:

Add the Page class prior to the user:

Page.User.IsInRole("whateverRole")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top