title: Microsoft CRM 2011 on premise cross domain authentication failing
body: <p>I have a CRM 2011 on premise installation on one domain and have a web server (server 2008) on a seperate domain with the web server hosting an MVC 3 website that is trying to access the services published on the CRM server. </p>
  
  <p>I am using an early bound entity class created by running CrmSvcUtil. </p>
  
  <p>My problem is when I try and use the services from code on the web server I receive a "The request for security token could not be satisfied because authentication failed" exception. </p>
  
  <p>If my CRM install is on premise is it actually possible to connect from another machine on a seperate domain without CRM being installed as IFD? </p>
  
  <p>I am using credentials to call the services...</p>
  
  <pre><code>public override bool ValidateUser(string username, string password)
      {
          var credentials = SecurityHelper.BuildClientCredentials(_crmUsername, _crmPassword, _domain);
  
  
          using (_serviceProxy = new OrganizationServiceProxy(new Uri(_organisationUri), null, credentials, null))
          {
              if (!string.IsNullOrEmpty(username) &amp;&amp; !string.IsNullOrEmpty(password))
              {
                  _serviceProxy.EnableProxyTypes();
  
  
                  using (var orgContext = new XrmServiceContext(_serviceProxy))
                  {......
  </code></pre>
  
  <p>And my helper class to create the credentials.....</p>
  
  <pre><code>public class SecurityHelper
  {
  public static ClientCredentials BuildClientCredentials(string username, string password, string domain)
      {
          var credentials = new ClientCredentials();
          credentials.Windows.ClientCredential = new System.Net.NetworkCredential(username, password, domain);
          credentials.UserName.UserName = username;
          credentials.UserName.Password = password;
          return credentials;
      }
  }
  </code></pre>
  
  <p>In terms of the application pool as the web server is on a different domain can I apply a user account from the CRM box?</p>