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

Discussion in 'ASP .Net' started by CFTK, Jan 5, 2007.

  1. CFTK

    CFTK Guest

    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!
    CFTK, Jan 5, 2007
    #1
    1. Advertising

  2. CFTK

    CFTK Guest

    Re: Error:Login failed for user ''. The user is not associated with a

    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...?
    CFTK, Jan 5, 2007
    #2
    1. Advertising

  3. CFTK

    Mark Rae Guest

    Re: Error:Login failed for user ''. The user is not associated with a

    "CFTK" <> wrote in message
    news:...

    > 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...
    Mark Rae, Jan 5, 2007
    #3
  4. CFTK

    Damien Guest

    CFTK wrote:

    > 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
    Damien, Jan 5, 2007
    #4
  5. CFTK

    CFTK Guest

    Thanks!!!!!!!!!!!!!!!
    CFTK, Jan 9, 2007
    #5
  6. CFTK

    CFTK Guest

    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!
    CFTK, Jan 9, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page