Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

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

 
 
jerminator@gmail.com
Guest
Posts: n/a
 
      12-09-2005
Ok I need some help. Up until Tuesday my application was working fine.
It is an asp.net application written in VB. It is very data heavy and
makes multiple calls to a database. The application itself sits on an
IIS6.0 server. And the database is on an SQL2000 server with SP 3a.

On Tuesday we started getting an error when we tried to call up the
application. It said: Login failed for user '(null)'. Reason: Not
associated with a trusted SQL Server connection.

The IIS server settings for the application are set to Windows
Authentication only

The web.config setting are as follows:

<identity impersonate="true" />

<authentication mode="Windows" />

<deny users="?" /> <!-- Allow all users -->

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes" cookieless="false"
timeout="20" />

And the connection string is: "data source=myserver;initial
catalog=myDatabase;Integrated Security=true"

I thought I was fine, I thought that I had a trusted connection set up
between the IIS server and the SQl server. Am I missing something here?
I think I have tried almost everything I have read about. Anybody have
any ideas? Thanks for your help.

 
Reply With Quote
 
 
 
 
neilphan@gmail.com
Guest
Posts: n/a
 
      12-10-2005
Hi,

I had this similar problem in the past.....Is your IIS Server and
Database on the SAME BOX or different?

If its on a different box, does your SQL Server has the WINDOWS ACCOUNT
USER that your IIS Server is CURRENTLY LOG ON AS?

Also, try this:
Configuring IIS to use with TRUSTED_CONNECTION ONLY:
1) Open IIS (Open up Control Panel/Administrative Tools/ Internet
Information Services)
2) In IIS, expand the Local Computer Tree/Web Site/Default Web
Site
3) Once the Default Web Site Tree has been expanded, you will see
a list of all your applications
4) Right Click Internet Information Services on A Specific
Application that you want to configure , select properties, go to the
Directory Secuirty Tab at the top, click on the Edit Button under
Anonymous access and authentication control, make sure that ONLY
Integrated Windows Authentication is Check, and select OK.
5) Close IIS.
6) In your web application, open up the Web.config File
7) Find the following tag in your file: <authentication
mode="Windows" />
Add the tag <identity impersonate="true" /> below
<authentication mode="Windows" />
9) Your Web.config should how look like this:
.. . .
<authentication mode="Windows" />
<identity impersonate="true" />
.. . .


You must make sure that SQL Server has the Same Windows User Account
that IIS is under, ie, the same windows user account you use when you
"LOGGED ON" to your OS.

Let me know how it turns out.

 
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