views:

50

answers:

2

I want to use Windows authentication within an MVC app, but only for certain areas of the site (i.e. admin area).

Currently I've set in the web.config; but unlike the Forms one this seems to force authentication on the whole application even though the controlers don't contain the [Authorize] filter.

Is this feature built in or will I have to resort to enrolling people into a forms based protection?

Solution

Found a good answer (as I couldnt get the AD user/pass) in using IIS auth http://support.microsoft.com/kb/316748/en-us

+1  A: 

This question might help.

cottsak
+1  A: 

Personally, I would use Forms Authentication using the Active Directory provider rather than use IIS Windows Authentication.

That way you still interact with Forms Authentication in your code as you normally would, but the information will be stored in Active Directory like you want.

...that's just me.

Justin Niessner
Its a corporate server so as far as I know I will be able to use the active directory. I'm not looking to add users just authenticate them.
Chris M
But you can authenticate against Active Directory using Forms Authentication with the Active Directory provider.
Justin Niessner
Cool; That answers the question :o) Ta
Chris M