473,395 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

web.config : <authentication>

Hi,
I'm having problems with the interpretation of roles in the <authentication> entries in web.config

Scenario :
I'm logging on as 'Administrator' and try to access a site for which the IIS-authentication method is set to 'Integrated Windows' only

Following are the web.config-entries of the site :
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow users="MYDOMAIN\Administrator" />
<deny users="*" />
</authorization>

When I access the site it displays :
Authenticated user: MYDOMAIN\Administrator
User was authenticated with: NTLM
Windows identity: MYDOMAIN\Administrator
==> OK

but... the following gives me an "Access Denied"
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow roles="MYDOMAIN\Administrators" />
<deny users="*" />
</authorization>

And I double-checked that Administrator is a member of the Administrators-group
I tried with other users-roles and every time I allow only access to roles doesn't I have access ??
How come ?

Any ideas ?
thanks
Chris
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 19 '05 #1
2 2397
Hi,

Try this:

<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>

I just removed "MYDOMAIN/".

Saravanan K V

"Chris C" wrote:
Hi,
I'm having problems with the interpretation of roles in the <authentication> entries in web.config

Scenario :
I'm logging on as 'Administrator' and try to access a site for which the IIS-authentication method is set to 'Integrated Windows' only

Following are the web.config-entries of the site :
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow users="MYDOMAIN\Administrator" />
<deny users="*" />
</authorization>

When I access the site it displays :
Authenticated user: MYDOMAIN\Administrator
User was authenticated with: NTLM
Windows identity: MYDOMAIN\Administrator
==> OK

but... the following gives me an "Access Denied"
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow roles="MYDOMAIN\Administrators" />
<deny users="*" />
</authorization>

And I double-checked that Administrator is a member of the Administrators-group
I tried with other users-roles and every time I allow only access to roles doesn't I have access ??
How come ?

Any ideas ?
thanks
Chris
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Nov 19 '05 #2
And it seems more logical to me if you use "deny roles" instead of "deny
users" in your case.
Your case may need to pass both "users" and "roles" level of filter before
you can gain access. (It is both logical and useful to check in both case)

"Saravanan K V" <Sa*********@discussions.microsoft.com> ¦b¶l¥ó
news:EB**********************************@microsof t.com ¤¤¼¶¼g...
Hi,

Try this:

<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>

I just removed "MYDOMAIN/".

Saravanan K V

"Chris C" wrote:
Hi,
I'm having problems with the interpretation of roles in the <authentication> entries in web.config
Scenario :
I'm logging on as 'Administrator' and try to access a site for which the IIS-authentication method is set to 'Integrated Windows' only
Following are the web.config-entries of the site :
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow users="MYDOMAIN\Administrator" />
<deny users="*" />
</authorization>

When I access the site it displays :
Authenticated user: MYDOMAIN\Administrator
User was authenticated with: NTLM
Windows identity: MYDOMAIN\Administrator
==> OK

but... the following gives me an "Access Denied"
<authentication mode="Windows" />
<identity impersonate="true" />
<authorization>
<allow roles="MYDOMAIN\Administrators" />
<deny users="*" />
</authorization>

And I double-checked that Administrator is a member of the Administrators-group I tried with other users-roles and every time I allow only access to roles doesn't I have access ?? How come ?

Any ideas ?
thanks
Chris
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pete Mahoney | last post by:
I am trying to 'POST' values from a form in a ASP file that has anonymous access permissions. I can retrieve the form values when I redirect to this page from another page which has also has...
0
by: cmrchs | last post by:
Hi, I can't make <allow roles...> to work in web.config I'm logging on as 'Administrator' and try to access a site for which the IIS-authentication method is set to 'Integrated Windows' only ...
1
by: Anton ml. Vaheie | last post by:
How do I convince (what I have to set in asp.net server) that my program that is using <authentication mode="Forms" /> can write to, copy, etc. files in directories on local disk? I have given...
4
by: Jiho Han | last post by:
I have the following defined in web.config under <configuration> node: <system.diagnostics> <switches> <add name="MainSwitch" value="4"/> </switches>
3
by: T. Regan | last post by:
I have a test app where I have Forms Authentication set up. When I build and run the app as http://localhost/testapp/login.aspx, it runs correctly. I get the login prompt and the proper...
4
by: Gawel | last post by:
Hajo, I know that I can not have two different <authenication> sections in ONE application. But I need to define two different login pages for two different subdirectories. Is it any workaround...
2
by: I am Sam | last post by:
Can someone tell me what is wrong with this web.config file? Whenever I try to open a file in the protected directory "Administration" I get an error message indicating that the <system.web>...
3
by: MikeM | last post by:
I've been trying to locate some property or method that will allow programmatic access to the "loginUrl" attribute in the web.config file in the <system.web> -> <authentication> element when the...
18
by: =?Utf-8?B?VG9t?= | last post by:
is it possible to add a bunch of users to group and only allow group to access the web page or do I need to add each user to the web.config file? Or is there another way to do this? I just took...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.