SQL Server authentication

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
 
?

=?iso-8859-1?Q?Fredrik_Norm=E9n_NSQUARED?=

Try to add Trusted_Connection=yes to your connection
string.

/Fredrik Normén NSQUARED
 
J

JerryK

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

vivek

Yes, I tried using userName and password in
connectionString. Still it does not allow me to access the
data outside the machine.
 
V

vivek

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
 

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