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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technical NinjaCommented:
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
Feridun KadirPrincipal ConsultantCommented:
Are you perhaps using a trial license that has expired?

Did Deployment Manager previously work?
0
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.