Dynamics 365 – Key not valid for use in specified state – Event 1309

This error will display in one of several ways depending on what you are trying to access, it can display as a generic “An error occurred” error to users upon login or it can display as something similar to the image below if you happen to have DevErrors enabled –

cryptographicKey1

ID1073: A CryptographicException occurred when attempting to decrypt the cookie using the ProtectedData API (see inner exception for details). If you are using IIS 7.5, this could be due to the loadUserProfile setting on the Application Pool being set to false.

 

It will also display as a Warning event with ID 1309 in the Event Viewer on the CRM server.

Continue reading “Dynamics 365 – Key not valid for use in specified state – Event 1309”

Dynamics 365 – “The instance name must be the same as computer name”

When installing Dynamics CRM on a server you may find you receive an error stating “The instance name must be the same as computer name”. This error refers to the SQL database which contains an invalid name for the server.

This normally only occurs when a machine has been renamed since SQL was installed however I’m sure there are numerous ways to cause this. It can easily be fixed however. Continue reading “Dynamics 365 – “The instance name must be the same as computer name””

4 Quick Wins to Improve Your Dynamics CRM Deployment

I thought it would be worth going over some potentially quick ways you can improve your CRM deployment. If you’re one of the many who has been working with CRM for a while now then you’ve undoubtedly developed new functionality, ‘improved’ forms and decided time and time again that you can improve the sales process in CRM, which is great, however there’s a tendency to avoid cleaning up old fields and the likes which can be a major frustration both for users and for those who have to manage CRM.

I’m going to cover some likely obvious but overlooked things that you probably need to consider doing, and then I’ll finish up by talking briefly about the built in maps functionality which can be a quick win with users and managers.

Continue reading “4 Quick Wins to Improve Your Dynamics CRM Deployment”

How to fix ‘Invalid Trace Directory’ errors

As part of the migration process I’ve been going through the event logs for our CRM deployment to ensure everything is working correctly, during this I came across an ‘Invalid Trace Directory’ error (event id 17203) which was showing the following –

Invalid Trace Directory. Additional Info:[ Invalid Trace Directory (Reporting Process:Trace Diretory is Null. TraceSettings: {Filename:  ,FileCountSuffix:1 ,TraceFileSize:10485760 ,TraceDirectory: ,TracingCallStack:No ,IsTracingOff:Yes ,LoadState:LoadSuccessfulUnreported ,RefreshTraceInt:-1 ,SiteWideRefreshTraceInt:-1 ,RegistryRefreshTraceInt:6 ,Precedence:Default} ] , AppDomain:CrmAsyncService)

This error is because by default the Trace Directory will be set to ‘C:\crmdrop\logs’ which doesn’t normally exist (but you can just create it for a quick fix, I’d suggest changing it using the instructions below though).

Although this error doesn’t cause a huge issue it can keep producing quite a few errors in the event log which nobody likes to see –

eventtraceissue

Now this is pretty easy to resolve using a bit of PowerShell as I’ll show below.

Continue reading “How to fix ‘Invalid Trace Directory’ errors”

How to Resolve 500 Internal Server Errors Caused by Custom Parameters in Dynamics CRM

I’ve spent quite some time now banging my head off the desk to figure out what was causing an issue with one of our PowerObjects solutions after we’d attempted to migrate to CRM 2016 from CRM 2013 and have finally found the cause.

Quite a few solutions in the market use custom parameters on the end of address’s to pass data which if you look at a network trace in any browser will display similar to this –

https://dynamics-URL/OrgName/WebResources/powf_/EntityLookup.html?dType=1

However, after you’ve migrated you may find you start seeing the ever useful generic 500 error when attempting to do lookups of any kind which I’ll show you how to fix.

Continue reading “How to Resolve 500 Internal Server Errors Caused by Custom Parameters in Dynamics CRM”

WindowsSearch error when installing Dynamics CRM on Server 2016

I’ve been testing the migration process from CRM 2013 to CRM 2016 recently and came across a potential issue, in some cases it seems that Windows Server 2016 has the search service disabled which causes an error message stating –

‘Action Microsoft.Crm.Setup.Common.InstallWindowsSearchAction failed. The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (Exception from HRESULT: 0x80070422)’

Continue reading “WindowsSearch error when installing Dynamics CRM on Server 2016”

Loading and Using Required Form Libraries Programmatically – JavaScript CRM 2013

Something I had quite a bit of trouble figuring out when I set out to make my own CRM solution is ‘how do I use required form libraries without manually adding them to each form?’  or to put it another way ‘is there any way to programmatically load web resources?’ and the answer is “by using the code below” and “yes”.

Before I continue I would like to give credit to Inogic from the Dynamics Community for providing the code I originally used.

Continue reading “Loading and Using Required Form Libraries Programmatically – JavaScript CRM 2013”