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

From: Greg Burns (greg_burns_at_DONT_SPAM_ME_hotmail.com)
Date: 09/02/04


Date: Wed, 1 Sep 2004 21:41:44 -0400


"Synching passwords" (aka pass-through authentication) worked before we went
to AD and continues to work in mixed-mode AD for us.

Here is link on the subject, all this one doesn't mention pass-through.
Cannot find the msdn article that did. :(
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconAccessingSQLServerFromWebApplication.asp

I am not using a domain account simply because I wasn't sure what
permissions to assign to it on the web server to mimick the default ASPNET
user. I just found this link, with which I might revisit the problem:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconASPNETRequiredAccessControlListsACLs.asp

Greg

"Jediah L." <rife@nospam.nospam> wrote in message
news:e2aLMR9jEHA.2340@TK2MSFTNGP11.phx.gbl...
> DC,
>
> Are you in an AD realm? If not - you will not be able to hop your
> identities across the machines, but still have a few other options.
>
> (its been a while since i've tackled the problem - but i'll do my best
from
> memory).
>
> 1: You can enable Basic Authentication instead of NTLM - while this is not
> very secure - it will allow your credentials you supplied to the web site
to
> be passed (clear text) to the server which contains the sql database -
just
> grant the authenticated account access to the DB.
>
> 2. Setup impersonation on your web site, using the Identity node in the
> web.config - keep NTLM on your site, and grant your identity that you
> impersonate access to the database (this also requires additional setup to
> the asp.net processModel - or elevating the ASPNET account to be able to
do
> identity impersonation), if you are in an AD realm you can let the web
> application impersonate the NTLM user - otherwise you can specificy a
> specific proxy account in the identity node - and encrypt it using the
> aspnet_setreg.exe.
>
> 3. I find it unlikely that syncing your passwords would work in any
> scanrio - while this would have worked back in NT - I don't believe
windows
> is still dumb enough to fall for it.
>
>
> This should give you enough information to poke around and get it right.
>
> Good Luck!
>
>
>
> "DC Gringo" <dcgringo@visiontechnology.net> wrote in message
> news:eSnPgu8jEHA.3456@TK2MSFTNGP12.phx.gbl...
> > Using latest SP Win2k and .NET versions, I have a .NET application
running
> > on server1 with a SQL Server database running on server2. I have the
> > Windows user account passwords sync'd for server1\aspnet (installed by
> > .NET
> > Framework and server2\aspnet (created by me--this machine has no .NET
> > Framework on it). The aspnet user on the database server (server2) has
> > access to the database.
> >
> > I still get: Login failed for user '(null)'. Reason: Not associated
with
> > a
> > trusted SQL Server connection.
> >
> > IIS is set to Windows Integrated Authentication...although same result
> > with
> > Anonymous, with and without IIS controlling password that I enter.
> >
> > -----------------------------------
> > Here's my connection string:
> >
> > Me.SqlConnection1.ConnectionString = "workstation id=""CIL-094"";packet
> > size=4096;integrated security=SSPI;data source=""myserver"";persist
> > security
> > info=False;initial catalog=mydb;"
> >
> >
> > -----------------------------------
> > Here's my web.config:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> > <system.web>
> >
> > <compilation defaultLanguage="vb" debug="true" />
> > <customErrors mode="Off" >
> > <error statusCode="404" redirect="~/errors/missingPage.aspx" />
> > </customErrors>
> > <authentication mode="Windows" />
> >
> > <authorization>
> > <allow users="*" /> </authorization>
> >
> > <trace enabled="true" requestLimit="10" pageOutput="true"
> > traceMode="SortByTime" localOnly="true"/>
> >
> > <sessionState
> > mode="InProc"
> > stateConnectionString="tcpip=127.0.0.1:42424"
> > sqlConnectionString="data source=127.0.0.1;"
> > cookieless="false"
> > timeout="20"
> > />
> >
> > <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
> > </system.web>
> > </configuration>
> >
> > --
> > _____
> > DC G
> >
> >
>
>



Relevant Pages


Loading