Error:Login failed for user ''. The user is not associated with a trusted SQL Server connection.

C

CFTK

we´re having problems to put our Website at IIS:
We have achieved it all works using the connectionString with user and
password of the superuser (sa), but with IntegratedSecurity we get the
following message after login in our application:

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

I don´t know if it even doesn´t see the username and password I
write, or if it is a problem with permission.... What I don´t
understand is that we haven't this problem with the integrated web
server and yes with IIS...


Concerning accesing directly the Default.aspx page I have already put
it as predetermined at the virtual directory but I only achieve to see
it if I check Windows Authentication but in that case when I want to
see the page from another machine I get the authentication window... (
It happens the same to see the images/pictures I have...)

Any idea...?


Thanks!
 
C

CFTK

yes, that is exactly what I have and it works, but we don´t want to
use it like that but with Integrated Security, and we don´t know why
it doesn´t work in that case ...or how to make it work,do you...?
 
M

Mark Rae

yes, that is exactly what I have and it works, but we don´t want to
use it like that but with Integrated Security, and we don´t know why
it doesn´t work in that case ...or how to make it work,do you...?

Integrated Security means that SQL Server's security is "integrated" into
Windows security i.e. you can use a Windows login account to gain access to
SQL Server.

When you configure your connection string to use integrated security, it
will try to connect to SQL Server using the Windows security credentials of
the current context i.e. whatever user is running the current process.

The 'sa' account is not a Windows accout - it's a built-in SQL Server
account - so it can't be used with integrated security.

As a general rule, it is bad practice to use the sa account for anything
other than system administration by the DBA...
 
D

Damien

CFTK said:
we´re having problems to put our Website at IIS:
We have achieved it all works using the connectionString with user and
password of the superuser (sa), but with IntegratedSecurity we get the
following message after login in our application:

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

I don´t know if it even doesn´t see the username and password I
write, or if it is a problem with permission.... What I don´t
understand is that we haven't this problem with the integrated web
server and yes with IIS...
Do these help?

http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/

http://support.microsoft.com/kb/810572

Both discussing issues with authentication, especially across multiple
machines, which is where this problem most frequently appears.

Damien
 
C

CFTK

I´m still just reading and it looks perfect, but I have ended up in
the article you referred me to

( http://support.microsoft.com/kb/810572)

where it says that to configure ASP.NET for delegation we have to put
in our web.config file <authentication mode="Windows"/>
but that´s avoids all the membership/roles configuration I have for my
aplication... ( i.e WAT).

Can´t it be done with <authentication mode="Forms"/> ??? ( In that
case I´d be lost!!)

Wait for your reply.Thanks in advance!
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top