在IIS 7.5上运行已发布的网站时出错

时间:2013-04-09 12:01:57

标签: asp.net sql iis

我有一个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"))

1 个答案:

答案 0 :(得分:0)

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

或参考以下链接

Login Failed 'sa'