Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

ASP .NET acessing Profile in global.asax

  • 28-09-2006 11:28AM
    #1
    Registered Users, Registered Users 2 Posts: 801 ✭✭✭


    Hi,

    I'm writing a web page in ASP .NET (C#). I'm using the Profile public property to store information for the user. I want to clear all of this information when the session expires. I've added a global.asax file and I've tried to put the code to clear the data in the Session_End event. However, the Profile object always seems to be null when this code is executed. It seems as though the Profile object is out of scope in the global.asax file.

    It's probably a long shot but has anyone ever come accross this before? Has anyone ever tried to reset data in the Profile object?


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Not what you're looking for but if you're clearing the data everytime a session ends, perhaps Session is where you should be storing it?


  • Registered Users, Registered Users 2 Posts: 801 ✭✭✭Nature Boy


    Yeah I'm probably gonna have to use it. But it's not strongly typed so it'll be messy code...


Advertisement