Click here to Skip to main content
15,921,884 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Email problem with ASP.NET 2.0 (VB) Pin
smita_roy19-Jun-06 19:35
smita_roy19-Jun-06 19:35 
GeneralRe: Email problem with ASP.NET 2.0 (VB) Pin
Keith Goddard20-Jun-06 11:34
Keith Goddard20-Jun-06 11:34 
Questioncan you help me do ma first web page please ? Pin
Mohammed Amine19-Jun-06 9:24
Mohammed Amine19-Jun-06 9:24 
AnswerRe: can you help me do ma first web page please ? Pin
Joshua Lunsford19-Jun-06 10:52
Joshua Lunsford19-Jun-06 10:52 
GeneralRe: can you help me do ma first web page please ? Pin
Mohammed Amine19-Jun-06 11:52
Mohammed Amine19-Jun-06 11:52 
QuestionDeploying SQL .MDF File [modified] Pin
emran83419-Jun-06 9:08
emran83419-Jun-06 9:08 
AnswerRe: Deploying SQL .MDF File Pin
Joshua Lunsford19-Jun-06 10:55
Joshua Lunsford19-Jun-06 10:55 
QuestionSiteMap + roles issue [modified] Pin
eggsovereasy19-Jun-06 8:51
eggsovereasy19-Jun-06 8:51 
So I have a Web.sitemap file like this:

<br />
<siteMapNode url="Default.aspx" title="Home"  description="Start Page"><br />
      <siteMapNode url="Profile/Default.aspx" title="Profile Settings"  description="Profile Stuff"><br />
        <siteMapNode url="Profile/Register.aspx" title="Register" description="Register your account"/><br />
        <siteMapNode url="Profile/RetrievePassword.aspx" title="Retrieve Password" description="Retrieve your password"/>      <br />
        <siteMapNode url="Profile/EditProfile.aspx" title="Edit Profile" description="Edit your profile" roles="User"/><br />
        <siteMapNode url="Profile/ChangePassword.aspx" title="Change Password" description="Change your password" roles="User"/><br />
      </siteMapNode><br />


Note the last two options have Roles="User". As I understand it that means when a Menu control is configured to get its data from SiteMap provider it will only display those options to users in the role of "User". Also, I understand it that unauthorized users have no roles. That being said when I navigate to the page with that menu on it without being authenticated all 4 nodes show up in the menu.

Now just to test I put this code in the codebehind:

this.Label1.Text = Context.User.IsInRole("User") ? "true" : "false";

And it does indeed print false on the page (and true when I do log in) so I know for a fact that as an anonymous user I am not in the "user" role. What am I doing wrong here?

-- modified at 14:51 Monday 19th June, 2006
EDIT: Fixed < and >
AnswerRe: SiteMap + roles issue Pin
minhpc_bk19-Jun-06 10:39
minhpc_bk19-Jun-06 10:39 
GeneralRe: SiteMap + roles issue Pin
eggsovereasy19-Jun-06 11:02
eggsovereasy19-Jun-06 11:02 
AnswerRe: SiteMap + roles issue Pin
sasi bhushan19-Jun-06 18:37
sasi bhushan19-Jun-06 18:37 
QuestionButton Event Pin
cppdotnet19-Jun-06 7:51
cppdotnet19-Jun-06 7:51 
AnswerRe: Button Event Pin
eggsovereasy19-Jun-06 8:55
eggsovereasy19-Jun-06 8:55 
GeneralRe: Button Event Pin
cppdotnet20-Jun-06 3:09
cppdotnet20-Jun-06 3:09 
GeneralRe: Button Event Pin
Guffa19-Jun-06 16:53
Guffa19-Jun-06 16:53 
QuestionNested datagrids; one edit? Pin
leckey19-Jun-06 7:11
leckey19-Jun-06 7:11 
AnswerRe: Nested datagrids; one edit? Pin
Sebastien Lachance19-Jun-06 8:56
Sebastien Lachance19-Jun-06 8:56 
GeneralRe: Nested datagrids; one edit? Pin
leckey20-Jun-06 7:22
leckey20-Jun-06 7:22 
QuestionAdvantages Pin
dansoft19-Jun-06 6:03
dansoft19-Jun-06 6:03 
AnswerRe: Advantages Pin
leckey19-Jun-06 9:08
leckey19-Jun-06 9:08 
QuestionMembeshipProvider and MembershipUser Pin
eggsovereasy19-Jun-06 4:05
eggsovereasy19-Jun-06 4:05 
AnswerRe: MembeshipProvider and MembershipUser Pin
minhpc_bk19-Jun-06 10:42
minhpc_bk19-Jun-06 10:42 
QuestionIIS Issue - WebServer is not running! Pin
Deepasubramanian19-Jun-06 3:58
Deepasubramanian19-Jun-06 3:58 
AnswerRe: IIS Issue - WebServer is not running! Pin
RichardGrimmer19-Jun-06 5:46
RichardGrimmer19-Jun-06 5:46 
QuestiondialogArguments_IE_PrintType is null or not an object:... Pin
Nagraj Naik19-Jun-06 3:53
Nagraj Naik19-Jun-06 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.