Home All Groups Group Topic Archive Search About

not associated with a trusted sql connection

Author
7 Mar 2006 1:31 PM
steven scaife
Hi in my page i am getting the following error

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

This only happens in ASP.net and doesn't happen in windows applications how
can i stop it from happening.

regards

Author
7 Mar 2006 1:41 PM
Miha Markic [MVP C#]
Hi Steven,

That's because your asp.net application is running on local asp.net account.
Either use username/password when connecting to sql server (not recommended)
or run your asp.net application under a trusted account.
If your sql server is on the same machine then you could add asp.net account
to the sql server logins.
What OS are you running on?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"steven scaife" <stevensca***@discussions.microsoft.com> wrote in message
news:7645DB92-5471-4B23-AD91-E4DBC770A52B@microsoft.com...
> Hi in my page i am getting the following error
>
> Message "Login failed for user '(null)'. Reason: Not associated with a
> trusted SQL Server connection." String
>
> This only happens in ASP.net and doesn't happen in windows applications
> how
> can i stop it from happening.
>
> regards
>
Author
7 Mar 2006 1:51 PM
steven scaife
I'm running on windows xp the sql box is on a server i'm currently doing
testing locally on my pc through vs.net

Show quote
"Miha Markic [MVP C#]" wrote:

> Hi Steven,
>
> That's because your asp.net application is running on local asp.net account.
> Either use username/password when connecting to sql server (not recommended)
> or run your asp.net application under a trusted account.
> If your sql server is on the same machine then you could add asp.net account
> to the sql server logins.
> What OS are you running on?
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "steven scaife" <stevensca***@discussions.microsoft.com> wrote in message
> news:7645DB92-5471-4B23-AD91-E4DBC770A52B@microsoft.com...
> > Hi in my page i am getting the following error
> >
> > Message "Login failed for user '(null)'. Reason: Not associated with a
> > trusted SQL Server connection." String
> >
> > This only happens in ASP.net and doesn't happen in windows applications
> > how
> > can i stop it from happening.
> >
> > regards
> >
>
>
>
Author
7 Mar 2006 2:08 PM
Paul Clement
On Tue, 7 Mar 2006 05:51:11 -0800, steven scaife <stevensca***@discussions.microsoft.com> wrote:

¤ I'm running on windows xp the sql box is on a server i'm currently doing
¤ testing locally on my pc through vs.net
¤

See the following:

http://harishmvp.blogspot.com/2005/05/you-may-receive-error-login-failed-for_25.html


Paul
~~~~
Microsoft MVP (Visual Basic)
Author
7 Mar 2006 1:58 PM
steven scaife
also i have set iis to use windows authentication

Show quote
"Miha Markic [MVP C#]" wrote:

> Hi Steven,
>
> That's because your asp.net application is running on local asp.net account.
> Either use username/password when connecting to sql server (not recommended)
> or run your asp.net application under a trusted account.
> If your sql server is on the same machine then you could add asp.net account
> to the sql server logins.
> What OS are you running on?
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "steven scaife" <stevensca***@discussions.microsoft.com> wrote in message
> news:7645DB92-5471-4B23-AD91-E4DBC770A52B@microsoft.com...
> > Hi in my page i am getting the following error
> >
> > Message "Login failed for user '(null)'. Reason: Not associated with a
> > trusted SQL Server connection." String
> >
> > This only happens in ASP.net and doesn't happen in windows applications
> > how
> > can i stop it from happening.
> >
> > regards
> >
>
>
>

AddThis Social Bookmark Button