2 กุมภาพันธ์ 2555 22:21
We have ASPX pages deployed to the ISV directory which the 2011 SDK says should still be supported (even though the directory has been deprecated). They work great in all scenarios (through the web – both on-premise/IFD, online outlook client, and they work when offline). The problem comes in when “offline” when playback occurs (of create/updates for example).
These pages/services are still using the 2007 endpoints. At least when using an IFD, the “playback” fails when going online. I have yet to test, but assume the same thing is true for plug-ins which run offline. Is there any way to make this work in the CRM 2011 offline client?
9 กุมภาพันธ์ 2555 23:44
Can you clarify what you mean when you say offline playback encounters a problem. Since an ASPX page can't be triggered during offline playback (only plug-ins and Workflows can) that you are referring to operations that were executed from the ASPX page.
As to the token that is used while authenticating, the authentication token mechanism has not changed. The following code should work (when Outlook is Online):
// CrmAuthenticationToken is defined in the Microsoft.Crm.Sdk.dll assembly
token = CrmAuthenticationToken.ExtractCrmAuthenticationToken(context, organizationName);
token.AuthenticationType = 0; //AD token.OrganizationName = organizationName; CrmService service = new CrmService(); service.Credentials = System.Net.CredentialCache.DefaultCredentials; service.CrmAuthenticationTokenValue = token; service.Url = baseServiceUrl + "CrmService.asmx";
If you are offline, there is a small change when generating the token:
// CrmAuthenticationToken is defined in the Microsoft.Crm.Sdk.dll assembly token = new Microsoft.Crm.Sdk.CrmAuthenticationToken(); token.AuthenticationType = 0; token.OrganizationName = organizationName; CrmService service = new CrmService(); service.Credentials = System.Net.CredentialCache.DefaultCredentials; service.CrmAuthenticationTokenValue = token; service.Url = "http://localhost:25/mscrmservices/2007/CrmService.asmx";
- เสนอเป็นคำตอบโดย Michael B. Scott - MSFTMicrosoft 9 กุมภาพันธ์ 2555 23:44
10 กุมภาพันธ์ 2555 13:11
I've never read that aspx pages (ISV directory) aren't supported offline. I know CRM won't take them off-line for me. My understanding was we were responsible for deploying those to users.
Regardless, your code samples look spot-on for what we are doing. And the ASPX point is moot, because I can get the same behavior using the 2007 endpoint in entity form scripting - causing creates or updates.
When I say offline playback encounters a problem - when you click 'Go Online', CRM will try to playback any create/update/delete (probably some others) to synchronize the data to the server. The list of requests to playback are in the OfflineQueue table of the local user's database. If one or more of these requests fail, you get a dialog showing failed requests. Note that these same requests succeeded while offline. So, any requests which I have against the 2007 endpoint are failing. After diagnosing, I've determined the errors are 401 errors and the apparent reasoning is we are in claims mode and CRM is not sending any authentication information in the request.
Thanks for your response, I have a call open with Microsoft Support at this point. It sounds like they've agreed with the scope of the problem. We'll see if they fix it.
28 เมษายน 2555 1:43If anyone comes looking - FYI - the bug was confirmed by Microsoft through a support case and last I heard was planned for Update Rollup (10 or 11) but subject to change.
- ทำเครื่องหมายเป็นคำตอบโดย John Hoven 28 เมษายน 2555 1:43