Sep 05, 2017 11:32 AM|Limbobski|LINK
Not sure exactly which group this belongs to. It's a question about ASP.NET and webservice authentication.
I have a Dynamics NAV Webservice that I use in my intranet solution (web solution). I want to access this webservice as the logged-on-user.
The website is using Windows authentication and when I enable impersonate it works fine on my computer both on IIS and IIS Express. I access the webservice as the logged on user (and not as the Application Pool Identity). Perfect!
System.Security.Principal.WindowsIdentity.GetCurrent().Name shows my username as it should. If I change impersonate to false, the WindowsIdentity changes to the application pool. As I expect.
Then I publish this site to another server on the same domain and the same setup gives me the error: "The remote server returned an error: (403) Forbidden." when connecting to the web service. So it seems this server is not passing on my credentials to the
webservice for some reason. System.Security.Principal.WindowsIdentity.GetCurrent().Name still shows my username, as it should, so the impersonate is doing something at least.
Why is my computer using impersonate as I expect and the server isn't?
I have tried Kerberos and NTLM on the webservice, but both work on my computer and not on the server.
The webserver is running Win 2012 R2 with IIS 8.5
My local computer is running Win 10 1703 with IIS 10