473,785 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login failed for user null occurs after a period of time

I have an identical SQL database on two machines (my machine and a web
server) that links to a database on a third server (S3). When I execute
a stored procedure on my machine that accesses a database on S3, it
always runs without a problem. However, when I run the same stored
procedure on the webserver (via Query Analyzer on my machine, connected
to the webserver), the stored procedure runs without a problem for
about ten minutes, and then I suddenly receive the error "Login failed
for user '(null)'. Reason: Not associated with a trusted SQL Server
connection.". If I then connect remotely to the webserver via Remote
Desktop Connection and run the stored procedure there it works, and
then I can run it again on the webserver via Query Analyzer on my
machine, but the same problem will occur again after about ten minutes.
The only difference between my machine and the webserver is that the
webserver is running Windows Server 2003, whereas my machine runs
Windows XP. All settings in SQL on the two machines are identical, so I
would love to know if anyone has a possible solution to this seemingly
random problem.

Jul 23 '05
23 9212
I tried using SQL authentication, and received the identical error,
"Login failed for user '???'. Reason: Not associated with a trusted SQL
Server connection."

Jul 23 '05 #11
I tried using SQL authentication, and received the identical error,
"Login failed for user '???'. Reason: Not associated with a trusted SQL
Server connection."

Jul 23 '05 #12
I tried using SQL authentication, and received the identical error,
"Login failed for user '???'. Reason: Not associated with a trusted SQL
Server connection."

Jul 23 '05 #13
It would appear that Active Directory is not actually installed on the
server (I apologize for not realizing this sooner, but knowing less
than nothing about network administration meant that I was looking in
Computer Management for things such as the Event Viewer). Would
installation be a likely solution to the problem?

Jul 23 '05 #14
(ce*******@ev1. net) writes:
I tried using SQL authentication, and received the identical error,
"Login failed for user '???'. Reason: Not associated with a trusted SQL
Server connection."


So the target server, does either
1) permit SQL authentication
2) does not trust the source SQL Server.

You never said whether you have a domain, or just a workgroup. Trusts
in workgroups is a tricky business.

If the target server permits SQL authentication, you could use
sp_addlinksrvlo gin, to configure a login to use when logging into the
linked server.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #15
Thanks for replying Erland. The three machines all belong to the same
domain, and I have all three set up to only use Windows Authentication,
with named pipes and tcp/ip (I have tried all permutations of removing
those without any success). I have spent all day trying every possible
suggestion that I have been able to find, including using SQL
authorization, but I still have the same error. It seems that my
identity does not get to the target server (S3) if I go from my machine
through the web server using either Query Analyzer or Enterprise
Manager, but I can connect to each of the two servers successfully from
my machine, and connect to each of the servers from the other server. I
hope that makes sense.

Jul 23 '05 #16
ce*******@ev1.n et wrote:
Thanks for replying Erland. The three machines all belong to the same
domain, and I have all three set up to only use Windows Authentication,
with named pipes and tcp/ip (I have tried all permutations of removing
those without any success). I have spent all day trying every possible
suggestion that I have been able to find, including using SQL
authorization, but I still have the same error. It seems that my
identity does not get to the target server (S3) if I go from my machine
through the web server using either Query Analyzer or Enterprise
Manager, but I can connect to each of the two servers successfully from
my machine, and connect to each of the servers from the other server. I
hope that makes sense.


Well, from what you've said, it sounds like some kind of impersonation
problem - you said it previously worked when the webserver was running
2000?

I'd guess it's a delegation issue (you're authenticated to the
webserver, but it cannot impersonate you to the third machine). That
speculation led me to this article, which describes what is necessary
for delegation to work:

http://www.databasejournal.com/featu...le.php/3341651

Let me know if that helps?

Damien

Jul 23 '05 #17
Damien,

Having just arrived at the office, and briefly skimmed through the
article, it sounds to be exactly what my problem is, so thank you very
much for that. I will let you know if I eventually solve the problem.

Jul 23 '05 #18
(ce*******@ev1. net) writes:
Thanks for replying Erland. The three machines all belong to the same
domain, and I have all three set up to only use Windows Authentication,
with named pipes and tcp/ip (I have tried all permutations of removing
those without any success). I have spent all day trying every possible
suggestion that I have been able to find, including using SQL
authorization, but I still have the same error. It seems that my
identity does not get to the target server (S3) if I go from my machine
through the web server using either Query Analyzer or Enterprise
Manager, but I can connect to each of the two servers successfully from
my machine, and connect to each of the servers from the other server. I
hope that makes sense.


Apparently there is some fine-print about Windows networking, Active
directory and all that, of which I will have to admit ignorance.

But it seems to me that this is not really an intermittent error, but
a permanent, it just takes ten minutues for your store procedure to
get there. This can easilly be examined by connecting to the web server
from your XP machine, and then directly run a command that accesses
the linked server.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #19
Erland Sommarskog wrote:
(ce*******@ev1. net) writes:
Thanks for replying Erland. The three machines all belong to the same
domain, and I have all three set up to only use Windows Authentication,
with named pipes and tcp/ip (I have tried all permutations of removing
those without any success). I have spent all day trying every possible
suggestion that I have been able to find, including using SQL
authorization, but I still have the same error. It seems that my
identity does not get to the target server (S3) if I go from my machine
through the web server using either Query Analyzer or Enterprise
Manager, but I can connect to each of the two servers successfully from
my machine, and connect to each of the servers from the other server. I
hope that makes sense.


Apparently there is some fine-print about Windows networking, Active
directory and all that, of which I will have to admit ignorance.

But it seems to me that this is not really an intermittent error, but
a permanent, it just takes ten minutues for your store procedure to
get there. This can easilly be examined by connecting to the web server
from your XP machine, and then directly run a command that accesses
the linked server.

Hi Erland,

The reason it appears intermittent (works for five minutes after having
been done from the local system), I believe, is that the webserver has
cached the credentials from when he logged onto the webserver - those
credentials are sufficient to authenticate to the third machine. After
some time, those credentials expire, and he's back to only being
authenticated with the webserver.

That is all, of course, assuming that the problem is due to delegation,
which is my expectation.

Windows login/network security always gets complicated/awkward when
three machines are involved - the client, the first server and the
second server.

Damien

Jul 23 '05 #20

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

Similar topics

3
6170
by: teddysnips | last post by:
In the script below is the DDL to create some tables and a UDF. What I'm interested in is the UDF at the end. Specifically, these few lines: --CLOSE OTRate --DEALLOCATE OTRate ELSE -- @NumRecords <= 0 If I uncommment CLOSE and DEALLOCATE and check the syntax I get a
4
7227
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 user account (with same password as aspnet user on IIS (Devweb01)) 2) edited local machine.config file <ProcessModel> Password attribute to same password (both on IIS and SQL Machine) 3) SQL Server security is Sql Server and Windows
2
2070
by: pvl | last post by:
Hi We have the following scenario: 1. SQL server 2000 on Windows 2003 Server 2. Web server 1, running web service 1 on Windows 2003 Server 3. Web server 2, running web service 2 on Windows 2000 Server 4. Client application. 1, 2 & 3 are all on the same Windows 2003 domain.
0
1329
by: PaulOak | last post by:
Hi all, I have the following problem: 1. web site (asp.net 2.0 C#). 2. WebPartZone, which contains one user control. 3. SQL Server 2000 running on dedicated DB server, hosting the aspnetdb database. Configured with aspnet_regsql.exe tool 4. Using Impersonation 5. Web.config:
5
2303
by: Ramtin | last post by:
Hi; when I use sql server connection or ole connection for working with database I receive the login failed for user 'any user that I work'.I've been granted ASPNET user in sql.
0
1518
by: Daniel Knöpfel | last post by:
Hello On our asp.net 2.0 website we impersonate every request to the identity of the user logged in. This works this way: 1. user logs in, providing username, password 2. user is authenticated against an active directory and the windows identity is retrieved (and stored in the session!!) 3. user is impersonated using the windows identity (thread is now running under the identity of the user)
0
1157
by: Anup Daware | last post by:
Hi All, I am facing this very weird issue, for every server request my control is redirecting to the login page and again coming back to the actual page from where the request was initiated when I set my custom Remember be cookie on the login page. Following are the details: 1. Authentication mode is ‘Forms’ 2. This issue is reproducible only in deployed applications, I found this using my trace and remote debugging 3. This issue occurs...
3
4043
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I want to limit the user only login the system one time at the same time. I don't want him login the system two with the same user at the same time. How to do this? If i have a table to record if this user has logined, this user didn't logout and just close IE, how do i set his recoed in the table logout? Thanks, -Billy
4
3789
by: Brett | last post by:
I have an ASP.NET 2.0 application that uses Forms Authentication. The startup page contains just a login control, and the site works well on an IIS 6 web server. I am now setting the site up on the production web server, which runs Windows 2008 Server and IIS 7. The login page comes up, but when I try to log in, I get the error, "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." For debugging...
0
9645
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
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7499
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
6739
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
5381
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
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
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.