Click here to Skip to main content
15,907,329 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Jesse Squire17-Aug-06 1:03
Jesse Squire17-Aug-06 1:03 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
leckey17-Aug-06 7:33
leckey17-Aug-06 7:33 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam17-Aug-06 7:45
Ramasubramaniam17-Aug-06 7:45 
AnswerRe: Some Interview Question , Dammmmmmmm Urgent Plz [modified] Pin
Uma Kameswari17-Aug-06 18:15
Uma Kameswari17-Aug-06 18:15 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam18-Aug-06 5:08
Ramasubramaniam18-Aug-06 5:08 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Uma Kameswari18-Aug-06 19:46
Uma Kameswari18-Aug-06 19:46 
GeneralRe: Some Interview Question , Dammmmmmmm Urgent Plz Pin
Ramasubramaniam21-Aug-06 3:44
Ramasubramaniam21-Aug-06 3:44 
QuestionRole based Sitemap node listing Pin
Tiger45616-Aug-06 23:28
Tiger45616-Aug-06 23:28 
Hi,

I am using Form Authentication in ASp.net 2.0 .
FormsAuthentication.SetAuthCookie(
           "jhon", false);

       FormsAuthenticationTicket ticket1 =
          new FormsAuthenticationTicket(
               1,                                   // version
               "jhon",   // get username  from the form
               DateTime.Now,                        // issue time is now
               DateTime.Now.AddMinutes(10),         // expires in 10 minutes
               false,      // cookie is not persistent
               "Admin"                              // role assignment is stored
           // in userData
               );
       HttpCookie cookie1 = new HttpCookie(
         FormsAuthentication.FormsCookieName,
         FormsAuthentication.Encrypt(ticket1));
       Response.Cookies.Add(cookie1);

       Response.Redirect("Default.aspx");


In Authentication_BeginRequest event i have this code
if (HttpContext.Current.User != null)
        {
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity;
                FormsAuthenticationTicket ticket = id.Ticket;

                string userData = ticket.UserData;
                string[] roles = userData.Split(',');
                HttpContext.Current.User = new GenericPrincipal(id, roles);
            }
        }


I am using Sitemap xml file where nodes specified with role attribute. When on binding the sitemap to a treeview . All nodes are listing. Seems role based listing is not comming into action. How to solve this problem.
AnswerRe: Role based Sitemap node listing Pin
Mike Ellison17-Aug-06 3:19
Mike Ellison17-Aug-06 3:19 
GeneralRe: Role based Sitemap node listing Pin
Tiger45617-Aug-06 18:32
Tiger45617-Aug-06 18:32 
GeneralRe: Role based Sitemap node listing Pin
Mike Ellison18-Aug-06 5:18
Mike Ellison18-Aug-06 5:18 
GeneralRe: Role based Sitemap node listing Pin
Tiger45621-Aug-06 5:51
Tiger45621-Aug-06 5:51 
Questiondownload a file on a button click Pin
Sivaprasad C16-Aug-06 21:51
Sivaprasad C16-Aug-06 21:51 
GeneralRe: download a file on a button click Pin
_AK_16-Aug-06 23:07
_AK_16-Aug-06 23:07 
GeneralRe: download a file on a button click Pin
Sivaprasad C17-Aug-06 8:41
Sivaprasad C17-Aug-06 8:41 
AnswerRe: download a file on a button click Pin
psamy16-Aug-06 23:15
psamy16-Aug-06 23:15 
AnswerRe: download a file on a button click Pin
Ramasubramaniam17-Aug-06 7:47
Ramasubramaniam17-Aug-06 7:47 
GeneralRe: download a file on a button click Pin
Sivaprasad C17-Aug-06 8:44
Sivaprasad C17-Aug-06 8:44 
QuestionGridView Pin
blurMember16-Aug-06 20:45
blurMember16-Aug-06 20:45 
AnswerRe: GridView Pin
coolestCoder16-Aug-06 21:09
coolestCoder16-Aug-06 21:09 
GeneralRe: GridView Pin
blurMember16-Aug-06 21:19
blurMember16-Aug-06 21:19 
GeneralRe: GridView [modified] Pin
coolestCoder16-Aug-06 21:31
coolestCoder16-Aug-06 21:31 
GeneralRe: GridView Pin
blurMember16-Aug-06 21:40
blurMember16-Aug-06 21:40 
AnswerRe: GridView Pin
Jay_se16-Aug-06 22:40
Jay_se16-Aug-06 22:40 
GeneralRe: GridView Pin
blurMember16-Aug-06 22:50
blurMember16-Aug-06 22:50 

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.