session Error是什么意思?请各位帮忙

来源:百度知道 编辑:UC知道 时间:2024/05/29 18:51:08
非常感谢
请各位帮忙如何解决?谢谢

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 31: username = Session["username"].ToString();