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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top