获取用户'NT AUTHORITY \ ANONYMOUS LOGON'的登录失败
我刚刚安装我的旧电脑来运行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
尝试设置您的连接字符串
伟大的工作,出色地完成JonC – redoc01 2012-01-05 18:44:24
@ redoc01随时随地高兴我可以帮忙。只是为了完整的这个线程。集成安全性忽略连接字符串中的用户名/密码并使用应用程序凭证,并且由于其上的模拟使用了匿名凭证 – user1231231412 2012-01-05 18:50:37
在集成安全=假从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