Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

Reply
Thread Tools

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

 
 
Waldy
Guest
Posts: n/a
 
      03-25-2008
Hi there,
I don't know if this is an IIS or SQL Server issue. I have an
ASP.Net web application that is set up with Anonymous access turned off and
Windows Authentication turned on. The SQL 2000 server (on another machine)
is set up for Windows only authentication. The application won't logon to
SQL Server, as I get the error above. I have searched for this error and
most of the articles suggest activating mixed mode authentication. This is
at a customer site however, and they want the server left as it is. How do
I make it work as intended.


 
Reply With Quote
 
 
 
 
Henning Krause [MVP - Exchange]
Guest
Posts: n/a
 
      03-25-2008
Hello,

since you have three machines involved in this scenario (client machine, web
server, sql server) you most likely don't have kerberos configured, which is
required for this scenario (delegation of account tokens). Search for
"double-hop problem" and you'll find plenty of resources on this.

If you want integrated authentication on the client side, you need kerberos.
If you can live with people entering their credentials you could switch to
basic authentication and authenticate to the sql server with those
credentials. You should only do this if you have SSL enabled, otherwise the
credentials would be transferred in clear-text over the network.

Third option: Use integrated authentication from the client to the webserver
and use the service account of the IIS (AppPool user under Windows 2003+) to
authenticate to the SQL server.

Kind regards,
Henning Krause


"Waldy" <> wrote in message
news:%...
> Hi there,
> I don't know if this is an IIS or SQL Server issue. I have
> an ASP.Net web application that is set up with Anonymous access turned off
> and Windows Authentication turned on. The SQL 2000 server (on another
> machine) is set up for Windows only authentication. The application won't
> logon to SQL Server, as I get the error above. I have searched for this
> error and most of the articles suggest activating mixed mode
> authentication. This is at a customer site however, and they want the
> server left as it is. How do I make it work as intended.
>


 
Reply With Quote
 
 
 
 
Waldy
Guest
Posts: n/a
 
      03-25-2008
Hi Henning,
there is already a .ASP application on the web server that
is working fine. It is only the ASP.Net application that has this problem.


 
Reply With Quote
 
Henning Krause [MVP - Exchange]
Guest
Posts: n/a
 
      03-25-2008
Hello Waldy,

are the Impersonation settings equal on both asp.net applicaitons?

Kind regards,
Henning Krause

"Waldy" <> wrote in message
news:...
> Hi Henning,
> there is already a .ASP application on the web server
> that is working fine. It is only the ASP.Net application that has this
> problem.
>
>


 
Reply With Quote
 
Waldy
Guest
Posts: n/a
 
      03-26-2008
"Henning Krause [MVP - Exchange]" <>
wrote in message news:...
> Hello Waldy,
>
> are the Impersonation settings equal on both asp.net applicaitons?


Hi Henning,
there is only one ASP.Net app, the other one is classic
..ASP and that works fine. Where are the Impersonation settings? If you are
talking about the IIS Web Site Properties / Directory Security /
Authentication Methods dialog, then yes, the settings are exactly the same.


 
Reply With Quote
 
Henning Krause [MVP - Exchange]
Guest
Posts: n/a
 
      03-26-2008
Hi Waldy,

take a look at the web.config of the ASP.NET application.

There should be a tag named <identity>. Check if it is set to
<identity impersonate="true" />

if it's not there or impersonate="false", then impersonation is disabled.

Kind regards,
Henning Krause

"Waldy" <> wrote in message
news:%...
> "Henning Krause [MVP - Exchange]" <>
> wrote in message news:...
>> Hello Waldy,
>>
>> are the Impersonation settings equal on both asp.net applicaitons?

>
> Hi Henning,
> there is only one ASP.Net app, the other one is classic
> .ASP and that works fine. Where are the Impersonation settings? If you
> are talking about the IIS Web Site Properties / Directory Security /
> Authentication Methods dialog, then yes, the settings are exactly the
> same.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Login failed for user ''. The user is not associated with a trusted SQL Server connection. eruth ASP .Net 4 10-30-2007 11:22 AM
Error:Login failed for user ''. The user is not associated with a trusted SQL Server connection. CFTK ASP .Net 5 01-09-2007 10:51 AM
Login failed for user ''. The user is not associated with a trusted SQL Server connection. Dennis ASP .Net 0 06-26-2006 03:55 PM
aspx - Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection Frederik ASP .Net 0 11-25-2003 09:08 PM
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Blake Versiga ASP .Net 2 07-09-2003 07:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57