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

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Miha Markic [MVP C#] (miha)
Date: 08/31/04


Date: Tue, 31 Aug 2004 09:25:11 +0200


"Brian Fulford" <brian.fulford@ssigroup.com> wrote in message
news:%23Pa7satjEHA.3632@TK2MSFTNGP09.phx.gbl...
> 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?

No, aspnet application is run under aspnet account by default (if not
otherwise specified) or under network service under windows 2003.

-- 
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
> ? 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: write with cURL
    ... you can stop making excuses. ... Part of Jerrys' security is not letting you on his server... ... up an account for you, process the billing, etc. ...
    (alt.php)
  • [NEWS] Xpede Found to Contain Multiple Vulnerabilities
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Intellisol Xpede ... anyone with a valid Xpede user account to issue requests to the Xpede's ... name used by Xpede to perform all its SQL queries. ...
    (Securiteam)
  • Re: Borland is neglecting Delphi for Win32 badly
    ... Today in SQL ... Server 2000 you can write server extensions as COM objects and call them via ... SQLCLR allows CLR ... The security benefits are also tremendous and we could discuss for a long ...
    (borland.public.delphi.non-technical)
  • Re: SQL account rights
    ... Please advice what is the best, suitable rights rather than domain admin ... issues, such as a server that might have IIS running on the same machine, ... applicable to SQL 2000 environment, ... files, or backups, make sure that the service account has Full ...
    (microsoft.public.sqlserver.security)
  • Re: write with cURL
    ... you can stop making excuses. ... up an account for you, process the billing, etc. ... possible features from a web site to make up for the security issues. ... Nothing you have told me shows me you know how to lock down a server ...
    (alt.php)