请问这是什么原因,在我本机测试不出现,放到服务器上就提示:未将对象引用设置到对象的实例。有哪位大哥能指点一下小弟。谢谢。

解决方案 »

  1.   

    错误提示是这样的:Server Error in '/' Application.
    --------------------------------------------------------------------------------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: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
    [NullReferenceException: Object reference not set to an instance of an object.]
       DatabaseConnection.ConnSql1() +24
       RndEng.ShowRndEng() +67
       dict_Default.Page_Load(Object sender, EventArgs e) +34
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436