maelstorm Posted November 14, 2005 Share Posted November 14, 2005 Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;"Dim MyConn As New SqlConnection(str)MyConn.Open()When I open in the local host, I am getting the following error. guessing it as some IIS problem, but cant figure out....ERROR:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Link to comment Share on other sites More sharing options...
kansasprog Posted November 14, 2005 Share Posted November 14, 2005 Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;"Dim MyConn As New SqlConnection(str)MyConn.Open()When I open in the local host, I am getting the following error. guessing it as some IIS problem, but cant figure out....ERROR:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.<{POST_SNAPBACK}> Dim str As String = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;username=username;password=password"Did you include username and password?Specify username and password for the above database and it should work fine.. You need to create username and password for the database for accessing data. Link to comment Share on other sites More sharing options...
aspnetguy Posted November 24, 2005 Share Posted November 24, 2005 Also in SQL Server if security is set to Integrated Windows Security you need to create the user in SQL Server and Windows. Link to comment Share on other sites More sharing options...
ranw3schools Posted November 25, 2005 Share Posted November 25, 2005 Also in SQL Server if security is set to Integrated Windows Security you need to create the user in SQL Server and Windows.<{POST_SNAPBACK}> goto http://www.connectionstrings.com for other sample of connectionstring to different database storage Link to comment Share on other sites More sharing options...
aspnetguy Posted November 25, 2005 Share Posted November 25, 2005 The connection string is the easy part but if you don't have your security setup correctly it won't work anyway! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now