Well, let me explain how SQL Server handles security first, so the next time
this issue comes up in some different fashion, you will know how to deal
with it.
SQL Server has 2 security modes: SQL Server only, and Mixed SQL Server and
Windows authentication. that is, SQL Server has its own built-in
authentication system, but it can also integrate with the local machine or
Active Directory to use Windows authentication. SQL Server's authentication
model is very similar to Windows, in that it has users and groups, and
specific levels of permissions. When SQL Server uses SQL Server
authentication, the Connection String must contain the user name and
password for that user to authenticate. In Windows authentication this is
not necessary, as the user's Windows credentials are passed in the message
itself. When using Windows authentication, the user that is requesting
access to the SQL Server must be a domain user account in Active Directory
(or the local machine, if the machine is not part of a domain), and that
account must be explicitly granted SQL Server parmissions.
Your error message indicates that you are using Windows authentication, in
which case, the user account under which your ASP.Net application is running
is not registered with SQL Server as a trusted account. Knowing that, your
solution is obvious.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
"news.microsoft.com" <v-*****@microsoft.com> wrote in message
news:eT****************@TK2MSFTNGP14.phx.gbl...
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.
I guess I get this because, my pages are hosted on WinXP IIS and the sql
server is on Win2k3.
So my aspnet a/c doesn't match with the Win2k3's aspnet a/c.
But what is the solution for this?
Thanks