Re: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection from ASP.Net pages

From: Brian Fulford (brian.fulford_at_ssigroup.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 16:17:19 -0500

Originally the app was set up to use sql security and not windows
authentication; however, it was mandated that we convert to windows
integrated security.

When I check the Windows Identity... IUSR is the current user.. so shouldnt
the IUSR account be able to access the SQL server if that user was created
on the SQL server?
? System.Security.Principal.WindowsIdentity.GetCurrent

{System.Security.Principal.WindowsIdentity}

AuthenticationType: "NTLM"

IsAnonymous: False

IsAuthenticated: True

IsGuest: False

IsSystem: False

Name: "CBF1\IUSR_FULFOB"

Token: 868

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:OU3ZoWtjEHA.1040@TK2MSFTNGP09.phx.gbl...
> Brian,
>
> aspnet Application runs under local aspnet account thus it can't connect
to
> sql server using integrated security.
> Why don't you use sql server security instead?
> Or you might run your app under some other domain account (see <identity>
> node of web.config)
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
>
> "Brian Fulford" <brian.fulford@ssigroup.com> wrote in message
> news:%234QX4%23sjEHA.728@TK2MSFTNGP09.phx.gbl...
> >I am losing lots of hair over this issue. We are trying to implement
> >windows
> > authentication from a web server to a database server.
> > The web server is on a domain; the db server is not... does this matter?
> > the IUSR_machinename user from the web server has been added as an
account
> > on the db server and also been to added to db logins and given access to
> > the
> > databases that it will need access to.
> >
> > My web.config has the following:
> > <authentication mode="Windows"/>
> >
> > <sessionState mode="SQLServer" sqlConnectionString="Network
> > Library=DBMSSOCN; data source=192.168.30.95; Integrated Security=SSPI;"
> > cookieless="false" timeout="20"/>
> >
> >
> > Anyone run into this?
> >
> >
> > Login failed for user '(null)'. Reason: Not associated with a trusted
SQL
> > Server connection.
> > at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
> > isInTransaction)
> > at
> >
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
> > tionString options, Boolean& isInTransaction)
> > at System.Data.SqlClient.SqlConnection.Open()
> > at System.Web.SessionState.SqlStateConnection..ctor(String
> > sqlconnectionstring)
> >
> >
> >
>
>



Relevant Pages

  • Re: Login failed for user (null)
    ... Not associated with a trusted SQL Server connection. ... However, if you deal with the Domain controller, most of the controls there ... > (Windows 2003 server, domain member). ...
    (microsoft.public.sqlserver.connect)
  • Re: Login failed for user (null)
    ... Not associated with a trusted SQL Server connection. ... However, if you deal with the Domain controller, most of the controls there ... > (Windows 2003 server, domain member). ...
    (microsoft.public.sqlserver.security)
  • Re: Login failed for user (null)
    ... Not associated with a trusted SQL Server connection. ... However, if you deal with the Domain controller, most of the controls there ... > (Windows 2003 server, domain member). ...
    (microsoft.public.inetserver.iis.security)
  • Re: Login failed for user (null)
    ... Not associated with a trusted SQL Server connection. ... However, if you deal with the Domain controller, most of the controls there ... > (Windows 2003 server, domain member). ...
    (microsoft.public.inetserver.asp.db)
  • Re: Login failed for ServerGuest
    ... I think it is not a limitation in Windows 2000. ... access SQL server on Win2000 server by using Windows authenctication if I ... | I have noticed that when I try to log in using Windows Authentication ...
    (microsoft.public.sqlserver.connect)