WebDev handles authorization diffrent from IIS 5.1

D

doeke.zanstra

When I run my webapp, IIS 5.1 (XP) is behaving different from
WebDev.WebServer (Visual Studio Development Server). I use Windows
authentication, and want to restrict access to a certain group. I do
that like this (part from web.config in the <system.web> part):
<authentication mode="Windows" />

<authorization>
<allow roles="GroupName"/>
<deny users="*,?"/>
</authorization>

When I run under IIS is just get the page after entering my username/
password in a dialog window. With WebDev I directly get an error
screen with:
"Error message 401.2.: Unauthorized: Logon failed due to server
configuration......."

Also, both following lines return true with IIS, but false with
WebDev:
User.IsInRole("GroupName")
new
WindowsPrincipal(Request.LogonUserIdentity).IsInRole("GroupName")

Who can help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top