使用连接字符串"Data Source=(local);Initial Catalog=dataHBlq;Integrated Security=SSPI;"连接到SQL SERVER数据库时显示错误:
Exception Details: System.Data.SqlClient.SqlException: 用户 'IBM\ASPNET' 登录失败。
这是怎么回事?怎么会出现用户登陆失败?怎么解决?

解决方案 »

  1.   

    ASP.NET runs under ASPNET account, which has limited privilege, and in your case, it cannot access the databaseif your database is local, add ASPNET account to the database, otherwise use a privileged account or change the authentication mode to mixed or  SQL authentication, and doData Source=(local);Initial Catalog=dataHBlq;uid=YourSQLLogin;pwd=YourSQLPassword;
      

  2.   

    用户名和密码呢?
    try this:
    uid=sa;pwd=sa;database=dataHBlq;server=(localhost)
      

  3.   

    http://www.chinaspx.com/comm/dotnetbbs/Showtopic.aspx?Forum_ID=5&Id=52251
      

  4.   

    Thank You,Problem Solved!^-^