all groups > dotnet web services > october 2005 >
You're in the

dotnet web services

group:

Confused about role based security configuration.



Confused about role based security configuration. Ken Varn
10/31/2005 10:38:31 AM
dotnet web services: I am configuring my web service with Web.config using windows
authentication. I want to limit the web service permissions by using the
allow / deny roles authorization. I have added the following in my
web.config:

<authentication mode="Windows" />
<authorization>
<allow roles="Administrators"/> <!-- I am assuming this can be
specified as a windows user group -->
<deny users="*" />
</authorization

When my application tries to make a call to the web service, I get a 401
error. I have set the credentials on the request to use DefaultCredentials,
which I am assuming uses the logged on credentials. The logon that I am
calling from is an Administrator calling the web service locally. Why am I
getting a 401 error? Is there something more that I need to do to allow my
logon to be able to call the local web service?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Re: Confused about role based security configuration. Peter Kelcey
10/31/2005 7:54:40 PM
Ken,

Use the following web.config settings instead of the ones you've got.

<authorization>
<allow roles="BUILTIN\Administrators" />
<deny users="*" />
</authorization>

Hope that helps.

Peter Kelcey
Re: Confused about role based security configuration. Ken Varn
11/2/2005 9:57:56 AM
Thanks for your help. That worked!

Just one other question. Do all Windows groups need to be preceded by
BUILTIN\ when specifying roles? I have seen this with SQL Server user role
settings, but I was unaware that it carried over to the web.config roles as
well.

Do you know if this is documented somewhere?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button