aothomas42
asked on
ASP.Net Profiles/Session Variables
So i'm trying to move away from Session Variables. In this site I am trying to optimize it uses too many of them. I have been looking into using ASP.Net Profiles instead. I have this example I found but can't seem to get it to work for me. Am hoping someone has seen it or something like it and knows what I can do get it working.
http://www.asp.net/downloads/sandbox/table-profile-provider-samples
In the default.aspx file in the page_load event the below line gives me the error
'The name 'Profile' does not exist in the current context'
txtFirstName.Text = Profle.FirstName;
http://www.asp.net/downloads/sandbox/table-profile-provider-samples
In the default.aspx file in the page_load event the below line gives me the error
'The name 'Profile' does not exist in the current context'
txtFirstName.Text = Profle.FirstName;
Session itself is not bad. I would suggest the following.
1) Have a disciplined session variables which are serializable so that they can be used with Inproc, StateServer and SqlServer.
2) Instead of storing just any variable, group those into the modules struct and then save it in the session.
1) Have a disciplined session variables which are serializable so that they can be used with Inproc, StateServer and SqlServer.
2) Instead of storing just any variable, group those into the modules struct and then save it in the session.
ASKER
Currently I am using Inproc and i believe this is what is causing the worker process to recycle so quickly. I am thinking of using State or SqlServer.
Could you explain your second part a little further
Could you explain your second part a little further
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Problem might be because of back up copy from the same file (copy of default.aspx) that you need to exclude from the project.
try the ways mentioned in this post
http://www.ajaymatharu.com/the-name-does-not-exists-in-the-current-context-asp-net/
http://www.ajaymatharu.com/the-name-does-not-exists-in-the-current-context-asp-net/
ASKER