主题:请教!第一天调试正常第二天出错
得到一个asp.net源代码的整站程序,第一天本地调试很正常。第二天开机进入主页发现下面的问题,数据重新导入,代码重新覆盖,还是这样的问题,请大侠帮忙看看
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:
Line 8: s1.ToString();
Line 9: SqlConnection conn=new SqlConnection(s1);
Line 10: conn.Open();
Line 11:
Line 12: string ssql="select top 10 wText,wkind from hot_schWord order by wTimes DESC";
Source File: E:\localhost\Main_top2.ascx Line: 10
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
LoadLibraryW(UInt16* ) +0
System.EnterpriseServices.Thunk.Security.Init() +76
System.EnterpriseServices.Thunk.Security.SuspendImpersonation() +81
System.EnterpriseServices.Platform.Initialize() +503
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
ASP.Main_Top2_ascx.ShowHotWord() in E:\localhost\Main_top2.ascx:10
ASP.Main_Top2_ascx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in E:\localhost\Main_top2.ascx:140
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
ASP.index_aspx.__Renderform1(HtmlTextWriter __output, Control parameterContainer) in E:\localhost\index.aspx:686
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +263
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
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:
Line 8: s1.ToString();
Line 9: SqlConnection conn=new SqlConnection(s1);
Line 10: conn.Open();
Line 11:
Line 12: string ssql="select top 10 wText,wkind from hot_schWord order by wTimes DESC";
Source File: E:\localhost\Main_top2.ascx Line: 10
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
LoadLibraryW(UInt16* ) +0
System.EnterpriseServices.Thunk.Security.Init() +76
System.EnterpriseServices.Thunk.Security.SuspendImpersonation() +81
System.EnterpriseServices.Platform.Initialize() +503
System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11
System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
ASP.Main_Top2_ascx.ShowHotWord() in E:\localhost\Main_top2.ascx:10
ASP.Main_Top2_ascx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in E:\localhost\Main_top2.ascx:140
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
ASP.index_aspx.__Renderform1(HtmlTextWriter __output, Control parameterContainer) in E:\localhost\index.aspx:686
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +263
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573