tags:

views:

74

answers:

1

Hi

I have a document approval workflow application. The workflow sends emails to appropriate users with links for Accept/Reject the document.

When the user clicks on Accept or reject link, an aspx page is shown, where he can type a comment and submit.

Now the question is I want Windows Authentication on this aspx page. If the user is authenticated I want its Userid to be checked against database if his role/profile has priveledge to view the page.

How should I achieve this?

+1  A: 

If the whole thing is internal (within your organization) then simply use Windows Authentication on the website. Other wise you have to mix Forms and Windows Authentication on the site. Here is an MSDN article about this.

Once authentication is wired up you can access the user's identity using static

System.Security.Principal.IIdentity user = Page.User.Identity;

property. It contains IsAuthenticated and AuthenticationType properties which you can put to use.

TheVillageIdiot