0

我有一个 asp.net 网站,它是在 asp.net 4.0 中开发的,具有来自数据库的数据绑定,该数据库在 sql server 2000 中维护。它在 localhost 上工作正常,但是当我在 IIS 上部署它并运行以下页面时正在发生错误。

Login failed for user 'testuser'. Reason: Not associated with a trusted SQL Server connection.

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.Data.OleDb.OleDbException: Login failed for user 'testuser'. Reason: Not associated with a trusted SQL Server connection.

源错误:

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.

  • 我正在使用混合模式身份验证,并且我的系统上安装了 sql server 2008
  • 我在我的 .cs 页面中使用以下连接字符串

using (OleDbConnection con3 = new OleDbConnection("Provider=SQLOLEDB;Data Source=sbs;User ID=testuser;Passwrd=pinkCITY01;Initial Catalog=PCGnet"))

4

1 回答 1

0

尝试将Integrated Security=SSPI添加到连接字符串

或参考以下链接

登录失败'sa'

于 2013-04-09T12:18:26.277 回答