I am trying to call a Web application from an IFrame in CRM 2011 开发者_如何学GoOn-Premises. In the Web Application , how can I get the Client Credentials of the User Logged in CRM to pass to the IOrganizationService?
I haven't worked with web applications for CRM 2011, as Microsoft is doing everything they can to make this as infeasible an option as possible, but in a client application, the following works for the credentials object to pass to the DiscoveryService/OrganizationService:
ClientCredentials credentials = new ClientCredentials()
{
Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials
};
It was somewhat similar for CRM 4 web applications, so this might work, but I have no idea what influence the fact might have that web applications for Eleven are supposed to run in their own IIS "Application" instead of the CRMWeb/ISV folder as in previous versions.
I've done it before, Actually, I give a username, password and domain (impersonation) for an existing CRM user.
but I had not tried this before
Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials
精彩评论