{Trips and Tricks}Error codes in Dynamics CRM 2013

Often we face issues in plugins and get error codes from CRM while debugging our server side code.

For e.g.

Error code 80048531 means CustomImageAttributeOnlyAllowedOnCustomEntity which is

A custom image attribute can only be added to a custom entity.

Just happened to pass by a cool resource containing the error codes and their descriptions. It is available on following path in CRM 2013 SDK:

SDK\SampleCode\CS\HelperCode

has excel named CrmErrors

Refer to image below:

clip_image002

Hope it helps!

Advertisement

{Error Resolution}Discovery service down in Dynamics CRM 2011/Dynamics CRM 2013

I noticed in our project recently that plugin registration tool was not connecting, even when giving correct credentials. When we tried to find the cause, CRM Discovery service was down. Event viewer had following log:

WebHost failed to process a request.

Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/58366981

Exception: System.ServiceModel.ServiceActivationException: The service ‘/XRMServices/2011/Discovery.svc’ cannot be activated due to an exception during compilation. The exception message is: Memory gates checking failed because the free memory (382599168 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. —> System.InsufficientMemoryException: Memory gates checking failed because the free memory (382599168 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

— End of inner exception stack trace —

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)

Process Name: w3wp

Process ID: 15700

——————————————————————

Resolution: The issue was resolved on restarting services on CRM server and CRM Database server.

Hope it helps!