I am having a problem using Windows Authentication
IIS has been configured to accept only Windows Authentication.
The web.config file is set to allow impersonation.

My WebService connects to a SQLServer database using the credentials of
the impersonated user.

If I connect to the webservice via a browser the call to the db has no problems
and my data is returned (this is mostly true but sometimes it fails).
But,
If I connect to the webservice via a web form or a windows application, I
authenticate with the Webservice OK, examination of my Windows Identity states
my user is who it is supposed to be, with the correct domain and name. The
call to the database fails when I call Open() on the connection.
The exception message is:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
It's like the database is receiving the wrong user credentials.

Does anyone know what is going wrong?

Thanks Andrew