SQL connection

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

Running ASP.NET 1.1 application on Windows XP Pro.
Trying to connect to a SQL 2000 server as the annonymous
user using a trusted connection.

I keep getting:
System.Data.SqlClient.SqlException: Login failed for
user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

The IUS_machinename login is a valid user in my SQL
database.

Does .NET use some other user authority to connect to a
sql database?
 
Use this syntax:

Dim cn As New SqlClient.SqlConnection("Server=(local);Database=LSP;User
Id=yourname;Password=yourpw;Trusted_Connection=False;")

cn.open()


Then on you're SQL database, set up a user with the correct username and
password. The ASPNET user should then be able to access your database.

Steve
 
I HAVE to use a Trusted Connection.

-----Original Message-----
Use this syntax:

Dim cn As New SqlClient.SqlConnection("Server= (local);Database=LSP;User
Id=yourname;Password=yourpw;Trusted_Connection=False;")

cn.open()


Then on you're SQL database, set up a user with the correct username and
password. The ASPNET user should then be able to access your database.

Steve












.
 
Back
Top