can I implement webparts in my project

Last post 06-24-2009 5:34 AM by stevew1975. 2 replies.

Sort Posts:

  • can I implement webparts in my project

    06-24-2009, 2:19 AM

    Present my project is running with 100 users(say a,b,c,d,..) with authentication mode as windows and iam using my own login page where there is my own login detail tables and sp to create the users and save the user information in sql serever 2005 db.and iam not using any kind of membership and roles or profiles in my application since my application runs on windows authentication mode...now my question is how can i implement webparts in my application?if i use how can i save the page deatials of my users.... ?

    when i search in asp.net ..through userdefined personalisation it is possible i found .but when i did that one it is not saving the page state of the users a,b,c who logins into my application .it is saving only one user which is the name of the system adminstrator and after using webparts ,my application is not running in iis  when login user selects the modes of the webparts...

    please help in this regards ....

     

  • Re: can I implement webparts in my project

    06-24-2009, 2:53 AM
    Answer
    • All-Star
      91,698 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,769
    • TrustedFriends-MVPs

    jagadeesh_sanapala:
    now my question is how can i implement webparts in my application?i
     

    See this: Implementing ASP.NET WebParts with Different Authentication modes

    "Code,Beer and Music ~ my way of being a programmer"

  • Re: can I implement webparts in my project

    06-24-2009, 5:34 AM
    • Participant
      1,066 point Participant
    • stevew1975
    • Member since 05-29-2009, 10:51 AM
    • Bristol, UK
    • Posts 189

    i had a similar problem when wanting to use web parts on a login page. 

    The problem is that when the user is on the login page, they are an anonymous user, as you do not know who they are until they log in. 

    You need to use the anonymous user authentication trick which is in the above link to make this work on the login page.  This will create a cookie and then grab the details from the aspnet database which is created.  this work fine, but when logging in you will need a different cookie.

    Basically the 'members' area of the site will have to be set up as a virtual directory, you will need to create the cookie through the server side code on the login page passing it to the members page.

               FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(
                        1, login1.UserName, DateTime.Now, DateTime.Now.AddMinutes(30),true,
                        "");
                string encryptedTicket = FormsAuthentication.Encrypt(authTicket);
                HttpCookie authCookie = new HttpCookie("logincookie", encryptedTicket);
                Response.Cookies.Add(authCookie);
                Response.Redirect("/members/Home.aspx");

    You will need to set up the web.config within the members directory to use this cookue.


    Hope this is clear and helps.




    Please mark this post as answered if it helped you!
Page 1 of 1 (3 items)