SQL Server authentication

  • Thread starter Thread starter vivek
  • Start date Start date
V

vivek

Hello,

I have a client written in Visual C# which accesses SQL
Server database and updates the tables.

This is the connection string:
string connectionString = @"Data Source=560dbserver;"+
@"Initial Catalog=cisdb";

I have commented "authorization", "authentication"
and "impersonate" elements in my web.config i.e., neither
am I using Windows integrated connection nor trusted
connections to access my SQL Server mode.

I have my SQL Server setup at mixed mode authentication
and I have created account for "ASPNET" account with a
password.

My questions is, when I run the web application it gives
me the following error:
Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection.

Can anyone help me out?

Thanks
 
Try to add Trusted_Connection=yes to your connection
string.

/Fredrik Normén NSQUARED
 
If you are not using trusted, impresinate, etc. in you app I think you need
tell SQL the username and password of the SQL user to use. Have you tried
adding a user=whatever your SQL account is; pass=yourpassword to your
connection string?
 
Yes, I tried using userName and password in
connectionString. Still it does not allow me to access the
data outside the machine.
 
I cannot use the Trusted_Connection=yes because it is not
a trusted connection since all the anonymous users access
the data using "ASPNET" account which is a local account
on SQL Server
 
Back
Top