装完iis,配置完成,又装了DotNet2.0然后进行预览提示这个错误!
“Server Error in '/' Application.”
The ConnectionString property has not been initialized. 
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.InvalidOperationException: The ConnectionString property has not been initialized.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: 
[InvalidOperationException: The ConnectionString property has not been initialized.]
   System.Data.SqlClient.SqlConnection.PermissionDemand() +852067
   System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   CMMB.DBUtility.DbHelperSQL.RunProcedure(String storedProcName, IDataParameter[] parameters, String tableName) +137
   CMMB.DAL.CmmbNewsDAL.GetList(Int32 PageSize, Int32 PageIndex, String strWhere) +680
   CMMB.BLL.CmmbNewsBLL.GetList(Int32 PageSize, Int32 PageIndex, String strWhere) +47
   CMMB.Web.Default.LoadCmmbNews() +69
   CMMB.Web.Default.Page_Load(Object sender, EventArgs e) +29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 请教各位老师!

解决方案 »

  1.   

    CMMB.DBUtility.DbHelperSQL.RunProcedure(String storedProcName, IDataParameter[] parameters, String tableName) +137 call DB之前没有打开SQLConnection。
      

  2.   

    System.Data.SqlClient.SqlConnection.Open() +111 
    应该是这个地方打开失败了,楼主在打开SQL连接以及DB操作的地方Try Catch下。
      

  3.   

    The ConnectionString property has not been initialized. 没有打开链接或者链接字符串配置出错