ASP.NET Sessions Question (Masterpage / Normal ASP.NET Page)
I've got a web application that uses both master pages and standard .aspx pages.
For my login routine I'm using sessions, I create the session when the user logs on, navigating through any content pages (assigned to the master page) works perfectly and all the session variables work fine, when I click on a link that takes me to one of the .aspx pages I get the following error:
Object reference not set to an instance of an object.
The strange thing, it's not happening on all computers. I cannot reproduce the error here on my work PC where th开发者_如何转开发e code is running locally.
When I try and run it on our server the error occurs.
Any thoughts?
Thank-you
I would try "tracing" the SessionID of the Session object to make sure that it is the same across pages.
I did have an issue similar to this on Tuesday and struggled with it for 7 hours (mainly due to the bureaucracy of our company not letting the developers deploy code and it worked for me locally) before finding out that I needed to add to the web.config. I thought that it would just default to the normal 20 minutes if this line was not in there, but it cleared up my issue. So this is something else to check.
Good luck. This doesn't sound like a whole lot of fun because there is no easy way to figure out what is going on.
精彩评论