Re: asp.net 2.0 roles not working when deploying to web server
- From: "clintonG" <nobody@xxxxxxxxxxx>
- Date: Thu, 19 Jul 2007 19:02:53 -0500
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
.
- Follow-Ups:
- References:
- Prev by Date: Messages not posted to forum
- Next by Date: Custom Date Control
- Previous by thread: asp.net 2.0 roles not working when deploying to web server
- Next by thread: Re: asp.net 2.0 roles not working when deploying to web server
- Index(es):
Relevant Pages
|