I've set up a site to use Impersonation and when I write to a file on the with the content of the currently logged on User, it is the correct impersonated user.
All computers are connected to a domain with Active Directory and the correct user is printed into the file that I write with the following lines of code:
WindowsIdentity.GetCurrent().Name,
Thread.CurrentPrincipal.Identity.Name,
ServiceSecurityContext.Current.WindowsIdentity.Name
These are written from a WCF Service.
The WCF Service should logon to AX using the Logon(null, null, null, null) to use the currently logged on User.
However! When I access the page from a different computer in the network than the one hosting the IIS, i still get the same username in the text-file I write, but it tells me "You are not logged on to Microsoft Dynamics".
BUT when the First request after iisreset is from the Hosting IIS machine, with the same User logged in via Remote Desktop, I can start the site and logon to AX.
And after that I can access the site With the same user from other computer, but I cannot access it with different users.
This is really hard to explain, any questions or suggestions why the Impersonation seems to fail start the business connector over network?
We use:
.NET 4.0
WCF
AX 2008
Windows Server 2008
IIS 7
Thanks
// F