title: How do I authenticate user between ASP.NET and WCF?
body: <p>We are developing a browser based intranet application. All users have active directory account, so obvious choice would be use Integrated Windows Authentication. But there will be multiple users accessing same client machine so we decided to use form based authentication (but authenticated against AD).</p>
  
  <p>In this scenario what is the best way to authenticate between my ASP.NET application (IIS) and WCF Services (another server IIS 7). I don't want to use asp.Net Compatibility mode or certificate.</p>
  
  <p>I am thinking to create another domain account to authenticate ASP.NET and WCF. I am also passing the information about the current ASP.NET user to WCF as header info. Is this the right way to do? The following code will call from ASP.NET to access and get each service method.</p>
  
  <pre><code> // Call WCF service from ASP.NET Application using a new domain account for each call.
   proxy.ClientCredentials.Windows.ClientCredential.Domain = "mydomain";
   ServiceReference.HelloWorldClient proxy = new ServiceReference.HelloWorldClient();
   proxy.ClientCredentials.Windows.ClientCredential.UserName = "new_domain_account";
   proxy.ClientCredentials.Windows.ClientCredential.Password = "password";
  </code></pre>
  
  <p>Is there any better way to authenticate WCF from ASP.NET? </p>
  
  <p>Thanks,
  Ash.</p>