This problem has been with us since more than 2 months. I am hoping someone will point me in the right direction. IIS 8.5, 7, 7.5 with Windows server 2012. All this started after upgrade to server 2012. I don't know what changes MS has introduced.
Symptoms:
Windows application with WCF service calls. Windows authentication is used.
If the first request and connection to the web service fails all subsequent requests will fail. If the first request succeeds then all subsequent connections to the web service succeeds. Here first request means after doing IIS reset. After IIS reset if a normal user tries to connect it kicks him out and all other requests including the admin. If they reset IIS and make an admin connect, then all normal users can connect successfully. We use NetworkService as the user. We tried it will all kind of users no luck.This is driving me crazy and already wasted a ton of time on it.
Moving on the second part of the problem:
We use Windows authentication. When I right click on the application and Run as Administrator, it works correctly. Now do a Reset and run as normal user, obviously the request fails. I observed that it does not even call the service operation. This is the code we use to create a proxy, nothing magical. This is related to permission that I understand. ?
SessionId = new WcfServiceProxy<IMyService>().Use(s => s.GetSessionDomainAuthentication());
It does not enter that operation GetSessionDomainAuthentication. It fails where it creates a proxy using channel factory action(client) and says <Module> error.
This is my observation and was wondering if this could be the reason. Since we are running this on Network Service as App pool user, should bin directory for the web service have Network Service set up in security group. Could this be the issue.? Since the error is 401.2, incorrect server configuration, this tells me it is permissions to access something.
There are 2 questions here
1) Is IIS caching the first request? HELP ME!!
2) What permissions does it need here.? Any tips Please.
This is on Production and affects more than 50% of our customers.
Thank you. Please suggest!!.