我剛剛安裝我的舊電腦來運行SQL Server和VisualSVN。我有一臺筆記本電腦和另一臺電腦,我需要在網站上工作,這就是爲什麼我設置顛覆和sql服務器在一個單獨的電腦上。我已成立的VisualSVN和ToirtoiseSVN但即時得到下面的SQL Server的問題是如何連接到數據庫IM:獲取用戶'NT AUTHORITY ANONYMOUS LOGON'的登錄失敗
Imports API.Database
Public Class DatabaseHelper
Private _SqlServer As SQLServer
Public Sub New()
End Sub
Public ReadOnly Property SqlServer() As SQLServer
Get
If Me._SqlServer Is Nothing Then
Me._SqlServer = New API.Database.SQLServer("192.168.1.3", "sa", "xxxxx", "xxxxxx_xxxxxx_xxxxxx")
End If
Return Me._SqlServer
End Get
End Property
End Class
Public Sub New(ByVal server As String, ByVal username As String, ByVal password As String, ByVal database As String)
If server = "" Then
server = "(local)"
//server = "localhost"
End If
If username = "" Then
username = "sa"
End If
Dim connectionString As String = String.Format("Data Source={0};Initial Catalog={3};Integrated Security=True;Persist Security Info=False;User ID={1};Password={2};", server, username, password, database)
//''''''Dim connectionString As String = String.Format("Data Source={0};Initial Catalog={3};User ID={1};Password={2};", server, username, password, database)
//''Dim connectionString As String = ConfigurationManager.ConnectionStrings("chatterconnectionstring").ConnectionString
Try
Me._SQLConnection = New SqlConnection(connectionString)
Me._SQLConnection.Open()
Catch ex As Exception
If True Then
Throw ex
End If
End Try
End Sub
我讀了幾篇文章,發現監守我在另一個位置和運行SQL Server的我在另一個位置的IIS上的Web項目這就是爲什麼我得到權限問題,但我該如何解決這個問題?
我使用SQL Server 2008 Express的R2和Visual Studio 2008
在集成安全=假從IIS或SQL這個錯誤? – user1231231412 2012-01-05 18:13:33
@JonC我相信錯誤來自SQL – redoc01 2012-01-05 18:16:57
您可以使用具有相同憑據的SSMS進行遠程連接嗎? – user1231231412 2012-01-05 18:19:47