473,698 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 :
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<allow users="MYDOMAIN \Administrator" />
<deny users="*" />
</authorization>

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

but... the following gives me an "Access Denied"
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<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 2412
Hi,

Try this:

<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<allow roles="Administ rators" />
<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 :
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<allow users="MYDOMAIN \Administrator" />
<deny users="*" />
</authorization>

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

but... the following gives me an "Access Denied"
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<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*********@di scussions.micro soft.com> ¦b¶l¥ó
news:EB******** *************** ***********@mic rosoft.com ¤¤¼¶¼g...
Hi,

Try this:

<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<allow roles="Administ rators" />
<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 :
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<allow users="MYDOMAIN \Administrator" />
<deny users="*" />
</authorization>

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

but... the following gives me an "Access Denied"
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />
<authorizatio n>
<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
5866
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 anonymous access permissions. However, if I change the page from which I'm redirecting to use NT authentication, then I cannot retrieve the values of the form fields using POST method. Specifically, if the following file (MyStart.asp) has anonymous
0
1369
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 Following are the web.config-entries of the site : <authentication mode="Windows" /> <authorization> <allow users="MYDOMAIN\Administrator" />
1
1813
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 full permisions to local directory (IUSR_Machinename user), but I still get: "System.UnauthorizedAccessException: Access to the path "D:\Inetpub\wwwroot\". Any idea how to change it?
4
15637
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
2562
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 redirection to the secured page. When I run the app as http://<RealMachineName>/testapp/login.aspx, I get the login page, but after logging in, I stay on the login page. The URL address shows...
4
1958
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 that allows me to do it using Forms authenication? thanks in advance Gawel
2
1812
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> Element is not recognized or something to that effect. Any suggestions or help would be greatly appreciated. I have attached the web.config file below. Thank you. ************************************************************ <?xml version="1.0"...
3
5264
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 config file is set up for Forms Authentication. I know certain system.web settings get mapped to various properties/methods during runtime (e.g. <sessionState>'s timeout attribute maps to the Session.Timeout property at runtime). You can easily...
18
4762
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 over a project and most of the web sites have users defined in the web.config file that can access the site. Now users come and go so this config file is always being modified. Could I just add the users to a group and only allow that group, or...
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9018
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8890
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.