【问题标题】:Error while running the published website on IIS 7.5在 IIS 7.5 上运行已发布网站时出错
【发布时间】:2013-04-09 12:01:57
【问题描述】:

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

【问题讨论】:

标签: asp.net sql iis


【解决方案1】:

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

或参考以下链接

Login Failed 'sa'

【讨论】:

  • 我使用了 Integrated Security=SSPI..但没有爱..现在它显示..用户“(null)”登录失败。原因:未与受信任的 SQL Server 连接关联
猜你喜欢
  • 2010-12-03
  • 1970-01-01
  • 1970-01-01
  • 2018-08-01
  • 1970-01-01
  • 2011-10-25
  • 2012-07-05
  • 2016-07-27
  • 1970-01-01
相关资源
最近更新 更多