簡體   English   中英

在IIS 7.5上運行發布的網站時出錯

[英]Error while running the published website on IIS 7.5

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

嘗試將Integrated Security = SSPI添加到連接字符串

或參考以下鏈接

登錄失敗“ sa”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM