post the detailed error message

解决方案 »

  1.   

    “/sale”应用程序中的服务器错误。
    --------------------------------------------------------------------------------常规网络错误。请检查您的网络文档。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: 常规网络错误。请检查您的网络文档。源错误: 
    行 79:  {
    行 80:  System.Data.SqlClient.SqlConnection mdb=new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["publicsqlstring"]);
    行 82:  }
    行 83: 
     
    System.Configuration.ConfigurationSettings.AppSettings["publicsqlstring"]是放在web.config里的连接字串 没有错误。
      

  2.   

    which line is causing the problem? I thought it should happen on mdb.Open(),can you output
    Response.Write("****" + System.Configuration.ConfigurationSettings.AppSettings["publicsqlstring"] + "****"); to make sure it is not empty?
      

  3.   

    System.Configuration.ConfigurationSettings.AppSettings["publicsqlstring"]
    是不会空的 整个工程都用这个连接,
    server=zbh;uid=sa;pwd=wec@@77;Database=yw错误源是 80 行
      

  4.   

    if System.Configuration.ConfigurationSettings.AppSettings["publicsqlstring"]
    is not null, SqlConnection mdb=new SqlConnection(...)cannot cause general network error, since it just creates an object this error normally happens when you try to call SqlConnection's Open() method, which draws an open connection from the connection pool if one is availableWhat protocols are you using? look into Client/Server Network Utility program in the Microsoft SQL Server group to make sure TCP/IP is being enabledalso see
    PRB: SQL Application Role Errors with OLE DB Resource Pooling
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q229564