Refreshing SQL Express database clears Session variables

I can’t vouch for the validity of this tip under all conditions, but while testing a Silverlight / ASP.NET  project, I queried the SQL Express database that was the main data source for my project, and when I went back to the ASP.NET page I was viewing, I received an “Object reference not set to an instance of an object error ” exception.

 Apparently, refreshing the database – in my case, the table that stored user information – will clear the Session variables. This is a very useful thing to know – it makes it easy to dig deep into the application, then clear the Session variables, and keep on trying to work in the application. It will let me know what the heck will happen if something really goes wrong.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: