Custom profile (vb.net assembly)

N

Nano

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top