469,329 Members | 1,326 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,329 developers. It's quick & easy.

Intermittent SQL Server login problem

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

Nov 19 '05 #1
2 1849
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.

"pvl" <pv*@gendac.co.za> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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

Nov 19 '05 #2
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.

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
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.

"pvl" <pv*@gendac.co.za> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Anthony | last post: by
8 posts views Thread by trinitypete | last post: by
2 posts views Thread by Mike Krajewski | last post: by
3 posts views Thread by Lee Chapman | last post: by
reply views Thread by Shane C | last post: by
3 posts views Thread by Velvet | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.