Custom profile (vb.net assembly)

Discussion in 'ASP .Net' started by Nano, Jun 7, 2007.

  1. Nano

    Nano Guest

    Hi,



    In an assembly I have created a class like this:

    <Serializable()> _
    Public Class Profile : Inherits System.Web.Profile.ProfileBase

    'some private vars and public properties

    End Class



    In the web.config I have the following:

    <profile inherits="CompanyName.Web.Profile" />
    <sessionState cookieless="true" />



    And I am able to retrieve the profile with:

    Public Shared ReadOnly Property Profile() As Web.Profile
    Get

    Return CType(System.Web.HttpContext.Current.Profile, Web.Profile)

    End Get
    End Property





    I am perfectly able to access the profile via the shared property with
    each page request, but the profile is not stored in any way. Upon each
    page request the Profile is created again (I have some code in the Sub
    New which inserts a record in a database, and upon each pagerequest a
    new record is inserted), while I thought the class would be saved during
    the complete session, even if a user is not authenticated.

    Am I missing something here? Do I not fully understand something?

    I hope someone can help me out. Thank you very much in advance!

    Nano
     
    Nano, Jun 7, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SA
    Replies:
    0
    Views:
    475
  2. Brad
    Replies:
    1
    Views:
    1,138
    Roedy Green
    Jul 19, 2005
  3. Nano

    Custom profile (vb.net assembly)

    Nano, Jun 7, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    323
  4. Andy B
    Replies:
    0
    Views:
    520
    Andy B
    May 3, 2008
  5. Steven
    Replies:
    5
    Views:
    491
    Steven
    Oct 24, 2008
Loading...

Share This Page