SQL connection

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?
 
S

Steve Caliendo

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
 
R

Robert

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












.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top