SYMPTOMS: Custom reports do not work with an SSRS log error similar to:
System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception.
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception.
System.ComponentModel.Win32Exception: The target principal name is incorrect —>
PROBLEM: This happens if the SPNs of the CRM web service is not set properly and SSRS server is unable to get a Service Ticket from the Ticket Granting Server (TGS).
SOLUTION: Register the following SPNs:
setspn -a http/<CrmApplicationServerName> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/crm DOMAIN\SVCCRM)
setspn -a http/<CrmApplicationServer FQDN> <CrmAppPoolServiceUserAccount> (E.g. setspn -a http/crm.domain.com DOMAIN\SVCCRM)
ACTION: Trying to send an email via workflow step.
RESULT: The below error appears on the event log.
#61042 – An error occurred while processing the outgoing e-mail message with subject “xxxxxxx” for SMTP: http://crm.org.se/org for delivery through SMTP-SERVER-NAME.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.SetPriority(OptionSetValue priority, MailMessage mailMessage) at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.PrepareMessage(Entity sendEmail) at Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.ProcessMessageInternal(Entity emailMessage)
CAUSE: The migration from CRM4.0 to CRM2011 caused some email templates to become corrupted.
RESOLUTION: Recreated email fields (removed and replaced To and From fields).
I had a session with Microsoft Support on this issue and we found a solution. The problem was that the workflows were created in CRM 4.0 and then upgraded to CRM 2011. The solution was to re-save all the e-mail templates within the workflows.
I opened the “create e-mail task”, removed To and From recipients and then re-inserted the same recipients and saved and re-activated the workflows. Now I could se that the Priority of the mail message was set to Normal instead of “blank”. And the mail got through.
So if you upgraded from CRM 4.0 this might be your problem. http://social.msdn.microsoft.com/Forums/en-US/crmdeployment/thread/a4ba8a3a-1a11-46e3-a96f-ef7d895a1e28
Having trouble with an unstable VPN connection? Try to keep it alive or troubleshoot by opening a command prompt and doing a “ping –t ipnumber” when connected over VPN. This will keep sending pings until you use Ctrl+C to end the loop, this way keeping the connection alive.
Symptoms: When using .NET Framework System.DirectoryServices hosted in an WCF or Web Services the first LDAP query is really slow but the following are fast. Then, after beeing idle for 15 seconds or more the following LDAP query is really slow again. The queries work, the only problem is the initial overhead when creating a connection to the LDAP server. And after 15 seconds the WCF thread pool recycles.
Cause: The issue could be caused by a mismatch in server certificate if your not calling from the same domain.
Resolution: Use System.DirectoryServices.Protocol instead in order to ignore certificate errors and turn off ReferralChasing.
Here’s a simple extenstion method to format a TimeSpan object as total number of hours and minutes (HH:MM) wich supports total hours above 24.
public static class Extensions
public static string ToHHMMString(this TimeSpan span)
int totalHours = (int) span.TotalHours; //truncate decimals
return totalHours.ToString(“00”) + “:” + span.Minutes.ToString(“00”);
You can easily change the display name of an CRM 4.0 and 2011 organization by disabling the organization in the Deployment manager and then edit the organization display name property. But changing the display name does not change the server url or database name.
Here’s how to:
- From CRM Deployment Manager
- Disable the organization.
- Select Edit Organization and change the Display name to <NewName>.
- Delete the organization.
- From SQL Server Management Studio
- To prevent the database being locked, take the organization datbase offline (Tasks –> Take offline) then bring it back online (Tasks –> Bring online).
- Rename the database to the new name
- From CRM Deployment Manager
- Choose import organization and select the newly renamed database. Follow the wizard and your done!