|
-
Apr 7th, 2004, 06:29 AM
#1
Thread Starter
New Member
Error with Integrated Security & SQL
Hi
I'm an ASP.NET newbie and am having a few problems connecting to our SQL Database.
I have got a really basic ASP.NET page that is connecting to a database and returning a list of users. The IIS is on my PC and I'm trying to connect to one of our SQL Servers on another box. I've updated the security setting in IIS to be windows integrated security. The SQL Server currently only accepts Windows Security. However I'm getting the following error...
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. "
The code i'm using is...
Dim conn As New SqlClient.SqlConnection _
("data source=xxxxxxxx; integrated security=SSPI;" & _
"trusted_connection=yes; initial catalog=xxxx")
Dim cmd As New SqlClient.SqlCommand("Select * from users", conn)
conn.Open()
Dim dr As SqlClient.SqlDataReader
dr = cmd.ExecuteReader
Do While dr.Read
Label1.Text &= dr("first_name") & " " & dr("last_name") & ", "
Loop
dr.Close()
conn.Close()
If I copy the same code into a new Windows Application and run it, it works fine?!
Please help! Thanks in advance
Lbob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|