472,780 Members | 1,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

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

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=" sqlConnectionString="data
source=;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.

Dec 9 '05 #1
1 1983

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
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" />
8) 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.

Dec 10 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: TBone | last post by:
Anyone, I have a user "john" whose machine is part of the "job" domain. He is trying to establish an odbc connection to an MS SQL 2000 server on the "school" domain. He uses Windows...
by: Mark | last post by:
We are using impersonation so that a user on our domain will login into our SQL Server using their own domain login and/or associated domain groups. To do this, we've added: <authentication...
by: Frederik | last post by:
Hi, First sorry for my english I'm french. I developped a web app that work good under XPDEVSERVER machine (iis5) and SqlServerDevelopper Edition. I get problem when I moved this app to an...
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
by: Nicola Marchiori | last post by:
Hi I need some help. I am developing a Web App in one PC running IIS. I am trying to connect to to MSDE on another PC, but it's not working. This is the message i got Login failed for user...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.