Intermittent SQL Server login problem

P

pvl

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.

Client application connects to web service 2 from the internet.
Web service 2 uses impersonation in web.config to impersonate a domain
account. It then connects to web service 1, which in turns connects to
SQL server using a trusted connection.

Web service 1 only allows windows authentication.
All servers are trusted for delegation.

Now for the problem: The first call after an idle period of 20 - 30
minutes always fails with SQL server reporting that the login failed
for user null.

Web service 1 impersonates the HttpContext.User.Identity before every
call to SQL server.

This works every time after the first failure, but leave it for 20
minutes and it fails again.

I can see that the impersonation from web service 2 works correctly,
because I trace HttpContext.Identity.Name as well as the currect thread
identity. These are always correct.

Any help will be appreciated
Thanks
Pierre-Andre
 
K

Kevin Spencer

Sounds like Session Timeout to me. Are you using Session or Application
State in either Web Service?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
P

Pierre-Andre van Leeuwen

We're not using any session state in the web services.
I've also been playing round with the settings on the application pools to
see if it has anything to do with that, but it doesn't seem so.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top