not associated with a trusted sql connection

G

Guest

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
 
M

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?
 
G

Guest

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

Miha Markic said:
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 said:
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
 
G

Guest

also i have set iis to use windows authentication

Miha Markic said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top