Answered by:
Is the 2007 endpoint unsupported in the Outlook OFFLINE client (claims/IFD)?

Question
-
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?
To get more detailed… (from Reflector) it looks like MS still has code in place to look for an MSCRMSession cookie (in the context of the outlook client) and uses this when it sees a 2007 endpoint for overwriting the SOAP header in the data from the OfflineQueue row. Unfortunately, it looks like they probably yanked whatever code sets this cookie since they’re now using the 2011 endpoint and holding on to the SecurityTokenResponse instead of the CrmTicket. Requests to the 2011 endpoint authenticate, but not requests to the 2007 endpoint.
(We realize the converting all of our stuff to html + javascript or Silverlight to make them fully supported as web resources is an option... but it is not something we want to consider in the short term).
- Edited by John Hoven Thursday, February 2, 2012 10:23 PM
- Moved by Kimberlee Johnson Friday, February 3, 2012 6:36 PM (From:Dynamics CRM)
Thursday, February 2, 2012 10:21 PM
Answers
-
If 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.
- Marked as answer by John Hoven Saturday, April 28, 2012 1:43 AM
Saturday, April 28, 2012 1:43 AM
All replies
-
John,
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
- Proposed as answer by Michael B. Scott - MSFTMicrosoft employee Thursday, February 9, 2012 11:44 PM
Thursday, February 9, 2012 11:44 PM -
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.
Friday, February 10, 2012 1:11 PM -
If 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.
- Marked as answer by John Hoven Saturday, April 28, 2012 1:43 AM
Saturday, April 28, 2012 1:43 AM