PC Review


Reply
Thread Tools Rate Thread

Custom profile (vb.net assembly)

 
 
Nano
Guest
Posts: n/a
 
      7th Jun 2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom profile (vb.net assembly) Nano Microsoft ASP .NET 0 7th Jun 2007 12:24 PM
ASP.NET Membership Provider with custom Profile - how to access all user's profile Dave Miyamasu Microsoft Dot NET Framework 0 1st Jun 2007 06:37 PM
Custom formatter - Loading assembly kplkumar@gmail.com Microsoft C# .NET 0 27th Mar 2006 09:00 PM
Assembly: custom attributes julien Microsoft C# .NET 5 9th Feb 2005 12:19 PM
Using Custom Assembly Installed in GAC =?Utf-8?B?Q2hyaXMgRmluaw==?= Microsoft ASP .NET 5 1st Nov 2004 09:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:36 AM.