日期:2014-05-18  浏览次数:20435 次

晕死~快崩溃了~
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.]
  Xin.Pro_Company_BLL.InfoOpertion.insertSql(Sql_InfoTab SIT) in D:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Company\Xin.Pro_Company\Xin.Pro_Company_BLL\InfoOpertion.cs:125
  Xin.Pro_Company.Admin.Admin_NewsAdd.Post() in D:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Company\Xin.Pro_Company\Xin.Pro_Company\Admin\Admin_NewsAdd.aspx.cs:66
  Xin.Pro_Company.Admin.Admin_NewsAdd.btnPost_Click(Object sender, EventArgs e) in D:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Company\Xin.Pro_Company\Xin.Pro_Company\Admin\Admin_NewsAdd.aspx.cs:47
  System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
  System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
  System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
  System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

 


--------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

------解决方案--------------------
引用-》对象
------解决方案--------------------
[NullReferenceException: Object reference not set to an instance of an object.] 
Xin.Pro_Company_BLL.InfoOpertion.insertSql(Sql_InfoTab SIT) in D:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Company\Xin.Pro_Company\Xin.Pro_Company_BLL\InfoOpertion.cs:125 
//注意检查Xin.Pro_Company_BLL.InfoOpertion的引用
分层的话,要添加项目引用,
再断点多跟踪下。

------解决方案--------------------
--空引用--未将对象引用添加到对象实例--
--疑为对象没有实例化--