473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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=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.

Dec 9 '05 #1
1 2025
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" />
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

2
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...
1
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...
2
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...
4
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.