473,795 Members | 2,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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:

<authenticati on mode="Windows" />
<identity impersonate="tr ue"/>

to our web.config file. In IIS, annonymous access is unchecked, digest
authentication is unchecked, basic authentication is unchecked, and
Integrated Windows Authentication is checked.

The problem: This works like a charm on my local pc running IIS and
connecting to SQL Server A, but the momemnt I load it up on our development
web site with the same web.config file and same IIS settings, the connection
to SQL Server A bombs with the error message:
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection." Note that the rest of the site that does not use a
connection to SQL Server works just fine.

Any ideas?? Thanks in advance for your help! We appreciate it.

Mark
fi******@umn.ed u

Nov 15 '05 #1
1 2722

Hello, Mark!
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:

<authenticati on mode="Windows" />
<identity impersonate="tr ue"/>

to our web.config file. In IIS, annonymous access is unchecked, digest
authentication is unchecked, basic authentication is unchecked, and
Integrated Windows Authentication is checked.

The problem: This works like a charm on my local pc running IIS and
connecting to SQL Server A, but the momemnt I load it up on our development web site with the same web.config file and same IIS settings, the connection to SQL Server A bombs with the error message:
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection." Note that the rest of the site that does not use a
connection to SQL Server works just fine.

Any ideas?? Thanks in advance for your help! We appreciate it.

Use the Integrated Security keyword for Connection String, set to a value of
SSPI, to specify Windows Authentication

--
WBR, Roman S. Golubin
ICQ UIN 63253392
go************* ***@arhcity.ru
Nov 15 '05 #2

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

Similar topics

5
2253
by: Dave | last post by:
I reinstalled SQL 2000 server after reformatting my drive. Now I cannot open a database in my C## program as before. If I use "Provider=SQLOLEDB;Data Source=localhost; Initial Catalog=master;Integrated Security=SSPI"; I get an Invalid login error. If I use "Provider=SQLOLEDB; Data Source=localhost; Initial Catalog=master;User ID=Dave;Password=midn1te"; I get the following error, "User no associated with a trusted SQL server...
0
1490
by: Frederik | last post by:
Bonjour , J'ai développé une petite application web sur winxp IIS5.0 avec Sql Server Developper edition. Tout fonctionne parfaitement. Par contre ca ne fonctionne pas lorsque je fais rouler l'app sur un autre serveur web(IIS5.0) win2000. C'est à dire, je n'arrive pas à me connecter à la base de donnée qui elle , est demeurré sur le poste de developpement (winxp) J'ai le msg erreur suivant: Login failed for user '(null)'. Reason: Not...
1
2117
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5 to run it, I get this error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection..." Here is my code (they are all generated by the wizard): Public Class WebForm1 Inherits System.Web.UI.Page
2
1433
by: news.microsoft.com | last post by:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I guess I get this because, my pages are hosted on WinXP IIS and the sql server is on Win2k3. So my aspnet a/c doesn't match with the Win2k3's aspnet a/c.
15
3316
by: Patrick | last post by:
I set my web.config as follows: <authentication mode="Windows" /> <identity impersonate="true" /> Logon to my ASP.NET website as a user who can authenticate to the target database. 1) Works fine on my local PC running IIS5.1 on WinXP Pro SP1 2) does not work on IIS6.0 on Windows 2003 server: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason:
12
6580
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I have added the new user to the database and have given the user access to the database for the app. But everytime I try and login using this users ID, I always get the error: Login failed for user Christian.Gaut If I login using my userid and...
0
1217
by: Don | last post by:
When I attempt to access a SQL Server database from my ASP.NET 1.1 application I get the folllowing error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I have impersonate set to true with the following setting in my web.config file. <identity impersonate="true" userName="" password=""/> This project had been working fine. A few weeks ago I installed Visual
3
4716
by: Newbie19 | last post by:
I'm having an issue with viewing my ASP/SQL application in Internet Explorer. I get the error from my Server (located on my PC using IIS 5.0) stating: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I am connected to the database because I can view it in VS 05 and run test queries on it in VS. This is the stack I get: System.Data.SqlClient.SqlInternalConnection.OnError(SqlException...
3
2518
by: Newbie19 | last post by:
I'm having an issue with viewing my ASP/SQL application in Internet Explorer. I get the error from my Server (located on my PC using IIS 5.0) stating: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I am connected to the database because I can view it in VS 05 and run test queries on it in VS. However, when I view the application on Internet explorer I get the error. My connection string is:...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.