CRM 4.0 Invalid license

When opening the Deployment Manager:

The type initializer for 'PIDGenNativeMethods' threw an exception.
System.TypeInitializationException


Server stack trace:
   at Microsoft.Crm.Admin.AdminService.LicenseHelper.PIDGenNativeMethods.Call(String licenseKey)
   at Microsoft.Crm.Admin.AdminService.LicenseHelper.ReadLicense()
   at Microsoft.Crm.Tools.Admin.LicenseController.GetRemainingDaysIfTrialLicenseAndIsNotificationDay()
   at Microsoft.Crm.Tools.Admin.DMSnapInController.GetRemainingDaysIfTrialLicenseAndIsNotificationDay()
   at Microsoft.Crm.Tools.Admin.DMSnapInHelper.DisplayMessageBoxIfTrialLicenseAndIsNotificationDay(Console console)
   at Microsoft.Crm.Tools.Admin.DMSnapIn.OnInitialize()
   at Microsoft.ManagementConsole.SnapInBase.Initialized()
   at Microsoft.ManagementConsole.Internal.SnapInClient.Microsoft.ManagementConsole.Internal.ISnapInClient.Initialize(ISnapInPlatform snapInPlatform)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at Microsoft.ManagementConsole.Executive.SnapInInitializationOperation.OnStart()
   at Microsoft.ManagementConsole.Executive.RunningOperationsTable.EnqueueOperation(Operation operation)
   at Microsoft.ManagementConsole.Executive.StandAloneComponentData..ctor(SnapInRegistrationInfo info, Int32 bookkeepingId)
   at Microsoft.ManagementConsole.Advanced.FrameworkSnapInFactory.Microsoft.ManagementConsole.Advanced.ISnapInFactory.CreateSnapIn(Int32 bookkeepingId, String snapInKey, Object& snapIn)


When accessing CRM (WEB):
Server Error in '/' Application.
--------------------------------------------------------------------------------

Invalid license. PidGen.dll cannot be loaded from this path C:\Program Files\Microsoft Dynamics CRM\Server\bin\PidGen.dll
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Crm.CrmException: Invalid license. PidGen.dll cannot be loaded from this path C:\Program Files\Microsoft Dynamics CRM\Server\bin\PidGen.dll

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[CrmException: Invalid license. PidGen.dll cannot be loaded from this path C:\Program Files\Microsoft Dynamics CRM\Server\bin\PidGen.dll]
   Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods..cctor() +254

[TypeInitializationException: The type initializer for 'PIDGenNativeMethods' threw an exception.]
   Microsoft.Crm.Admin.AdminService.PIDGenNativeMethods.Call(String licenseKey) +0
   Microsoft.Crm.Admin.AdminService.LicenseHelper.ReadLicense() +322
   Microsoft.Crm.Admin.AdminService.CrmLicenseService.IsDeploymentExpired() +99
   Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context) +120
   Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context) +123
   Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context) +119
   Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context) +119
   Microsoft.Crm.BusinessEntities.SecurityLibrary.IsOrganizationSpecialUser(Guid organizationId, Guid userId, ExecutionContext context) +188
   Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context) +766
   Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context) +553
   Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context) +119
   Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context) +119
   Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo) +396
   Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId) +212
   Microsoft.Crm.Authentication.CrmWindowsIdentity..ctor(WindowsIdentity innerIdentity, Boolean publishCrmUser, Guid organizationId) +389
   Microsoft.Crm.Authentication.WindowAuthenticationProviderBase.Authenticate(HttpApplication application) +723
   Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application) +302
   Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application) +106
   Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e) +1194
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3618
VPuserAsked:
Who is Participating?
 
VPuserAuthor Commented:
Hi,

we have solved the problem. We had to disable Group Policy restrictions on the OU where the CRM Server resides.

Regards
Morten
0
 
Chinmay PatelEnterprise ArchitectCommented:
Hi VPUser,

Can you check if C:\Program Files\Microsoft Dynamics CRM\Server\bin\PidGen.dll exists?

Regards,
Chinmay.
0
 
VPuserAuthor Commented:
Hi,

the file exists. File version: 1.6.0.34463

Regards,
Morten
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Feridun KadirPrincipal ConsultantCommented:
Are you perhaps using a trial license that has expired?

Did Deployment Manager previously work?
0
 
VPuserAuthor Commented:
It solved the CRM problem
0
 
ali2012Commented:
"We had to disable Group Policy restrictions on theOU where the CRM Server resides"

I have the same issue, could you elaborate on the above to help resolve?

Do you mean removing/preventing any GPOs from applying to the OU in which the CRM server sits?  I have the same GP applying to other CRM installations, the only different policy I have applying to this one in are to set members of local admins.

Any help appreciated.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.