troubleshooting Question

CRM 4.0 Invalid license

Avatar of VPuser
VPuserFlag for Denmark asked on
Microsoft Dynamics
6 Comments1 Solution2361 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
VPuser

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 6 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 6 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004