Re: asp.net 2.0 roles not working when deploying to web server



Start by reading another news article posted earlier today: "Membership
database problems."

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/




"Homer" <HomerS007@xxxxxxxxx> wrote in message
news:1184882446.131681.157690@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm developing my first ever web application and I'm running into a
lot of problems. My problem I'm encountering now is how to make roles
work when I deploy my web app to my company's server. It's an
Intranet application. I used forms authentication and I enabled the
role manager in the web.config file. I created a folder in the
application root directory and put all the web pages that require
authentication in there. Then I created a web.config file for that
folder like the following:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<deny users="*" />
</authorization>
</system.web>
<location path="HRSearch.aspx">
<system.web>
<authorization>
<allow roles="HumanResourceMember"/>
</authorization>
</system.web>
</location>
<location path="YourInformation.aspx">
<system.web>
<authorization>
<allow roles="User, HumanResourceMember"/>
</authorization>
</system.web>
</location>
</configuration>

the next thing I did was adding roles into the site.sitemap file like
the following:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0";

<siteMapNode url="Default.aspx"
title="Home"
description="Home page">
<siteMapNode title="Personnel Information" roles="*" >
<siteMapNode url="PersonnelInformation/HRSearch.aspx"
title="Personnel Search"
description="This option is only available to HR
staff"
roles="HumanResourceMember" />
<siteMapNode url="PersonnelInformation/YourInformation.aspx"
title="Your Information"
description="Your personal information"
roles="User,HumanResourceMember"/>
</siteMapNode

The roles implementation works on my development machine but when I
deployed the application to my company's IIS server it does not work.
When I login in as a member of the user role, I expect to see the
"Your Information" page. When I login as a member of the
HumanResourceMember, I expect to see the "Personnel Search" page. It
works wonderfully on my XP development machine but neither of the
aforementioned pages show up when I login to it remotely. I don't
even know how to google this problem. Please help me.

Thank you,
Jon



.



Relevant Pages

  • asp.net 2.0 roles not working when deploying to web server
    ... The roles implementation works on my development machine but when I ... When I login in as a member of the user role, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: asp.net 2.0 roles not working when deploying to web server
    ... Did you actually put the roles in the live database or did you only use the ... The roles implementation works on my development machine but when I ... When I login in as a member of the user role, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: asp.net 2.0 roles not working when deploying to web server
    ... When I login in as a member of the user role, ... database problems but did not find anything applicable to my problem. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: sp_revoke login is not working as expected.
    ... EXEC xp_logininfo 'MyDomain\SomeUserAccount','members' ... Try specifying a group member rather than the group. ... This should list the Windows groups the user can connect with. ... connect with the non-existing login. ...
    (microsoft.public.sqlserver.security)
  • Re: Secure a custom object
    ... use AD for authentication, but not authorization. ... Windows authorization APIs to check to see if a user is a member of a group ... create groups in the directory because the naming convention determines the ... AzMan is a role-based security model where all the operations are known in ...
    (microsoft.public.windows.server.active_directory)