|
-
May 31st, 2005, 02:17 AM
#1
Thread Starter
Frenzied Member
Trouble with authentication in asp.net
Im trying to setup windoes based security for my asp.net web app in server 2003. This is what I have done
* Created the user "testuser" on the local machine
* created the group "testgroup" on the local machine
* added testuser -> testgroup
* created an asp.net webapp in IIS and set it to windows authentication
* in explorer, I have added testgroup to read rights on the web app folder.
* Now I run the app, I enter the username and password and it let me in..
BUT when I write User.IsInRole("testgroup") I get "false"... why is that??? I should get "true"....
so my problem is with the groups, everything else works fine!!!
whats the problem?
/Henrik
-
May 31st, 2005, 04:34 AM
#2
Re: Trouble with authentication in asp.net
Have you set identity impersonation to true?
-
May 31st, 2005, 08:08 AM
#3
Thread Starter
Frenzied Member
Re: Trouble with authentication in asp.net
Yes!! But im not sure it matters?
I have done something similar for a winforms app, but there I fetched the group info from the AD using system.directoryservices and then created genericprincipal and genericidentity... then it works to check Thread.User.IsInRole("wewwq"),,,
im not sure what to do with asp.net to get the same functionality...
/henrik
-
May 31st, 2005, 09:51 AM
#4
Member
Re: Trouble with authentication in asp.net
Maybe you need to disable "anonymous" in the IIS server.
It may be passing "anonymous" instead of the user id.
?
-
Jun 1st, 2005, 12:55 AM
#5
Thread Starter
Frenzied Member
Re: Trouble with authentication in asp.net
i have disabled anonymous login in the IIS, and set to windows authentication... and I get the correct username when using User.Identity.Name its the groups that dont work correct
/Henrik
-
Jun 1st, 2005, 02:33 PM
#6
I wonder how many charact
Re: Trouble with authentication in asp.net
Have you restarted the machine for the group changes to take effect? Or tried issuing iisreset at the command prompt?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|