views:

20

answers:

2

I am having IIS Anonymous authentication set for website on server.However i want to use active directory group to validate user credentials.Here is the setting in web.config for folder "security".

    <allow users="Americas\ADgroup" />
    <deny users="*" />

Can i gain this validation without manually changing the Anonymous authentication on server.As it is anonymous authentication set,it thorws me error

401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied.

Is there anything else to be written in web.config?

Thanks in advance.

A: 

You cant have an anonymous site yet want to authorise people to see restricted content based on their user. It just cant happen, the user credentials are not passed to the site if anonymous authentication is switched on.

If your site is a mixture of public and authorisation-required content then consider using .net authentication with AD (http://msdn.microsoft.com/en-us/library/ms180890%28VS.80%29.aspx this article shows you how) and set the web.config file to only require authentication for a number of subsites, thus the users do not get asked to log in.

Mauro
+1  A: 

Thank you.Can i change the anonymous setting on IIS through web.config rather than manually changing the setting on server?

User123
not as far as I am aware, the article I linked to provides all the information you need to set up AD Authentication.
Mauro