title: How to pass on user's identity from web application hosted in one IIS to the web service hosted in another IIS?
body: <p>I have a web application (developed in ASP.net 4.0) hosted in <code>IIS 6.0</code> on <code>Windows Server 2003 R2</code> machine. <code>Integrated Windows Authentication</code> is turned on for this web application.</p>
  
  <p>I have hosted a web service (developed using WCF) in <code>IIS 7.5</code> on <code>Windows Server 2008 R2</code> machine. '<code>Windows Authentication</code> is enabled for this web application too.</p>
  
  <ul>
  <li>I log on to my local machine using my windows domain account. When I browse the web application, it asks me my domain username and password. In web app, I get my identity correctly. </li>
  <li>From my machine (using some other Winform app), if I call the same web application (of a web service), service code executes under my windows identity. </li>
  </ul>
  
  <p><strong>So <code>Integrated Windows Authentication</code> works fine independently for both the web apps hosted in separate IIS on different machines.</strong></p>
  
  <p>Problem comes when the web application is browsed from my local machine and web page calls the service internally. In this case, "service does not run under my windows identity" as expected. It either runs under identity of the application pool of either asp.net web app or the web service's web app. </p>
  
  <p><strong>I don't want my web service to take responsibility of authenticating the user. It would use simple <code>basicHttpBinding</code>. It will just read name of the user using <code>CurrentPrincipal</code> or <code>HttpContext</code> etc. Validating user's identity should be done by the IIS only.</strong></p>
  
  <p>Can someone help me to pass on my windows identity from one IIS to another?</p>