After Upgrading From Dynamics 365 CRM On-premise V 9.0.51.06 To V 9.1.26.23 we start getting the following exception in the event log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/15/2024 11:37:31 AM
Event time (UTC): 3/15/2024 3:37:31 PM
Event ID: 221f3bb18dea4e3c96c481014b22bc47
Event sequence: 121656
Event occurrence: 41
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-2-133555191305009335
Trust level: Full
Application Virtual Path: /
Application Path: C://Program Files//Dynamics 365//CRMWeb//
Machine name: D365Server
Process information:
Process ID: 15728
Process name: w3wp.exe
Account name: asa//admin
Exception information:
Exception type: CrmException
Exception message: The current organization id could not be determined.
at Microsoft.Crm.Application.Security.UserInformationIdentity.get_OrganizationId()
at Microsoft.Crm.CrmCache`1.InternalAddEntry(String cacheKey, Object value, String[] dependencyKeys, IOrganizationContext context)
at Microsoft.Crm.CrmCache`1.AddEntryNoLock(String key, TValue value, String[] dependencyKeys, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntityFromLookupInternal(String key, TValue value, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookupCallback(String key, TValue value, IOrganizationContext context, Object parameter)
at Microsoft.Crm.CrmCache`1.AddEntry(String key, TValue value, IOrganizationContext context, AddEntryCallback`1 callback, Object callbackParameter)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookup(String key, TValue value, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Application.Themes.Theme.get_Current()
at ASP.devorg__common_styles_theme_css_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: https://D365Server:443/DevOrg/_common/styles/theme.css.aspx?lcid=1033&ver=-1541556217
Request path: /DevOrg/_common/styles/theme.css.aspx
User host address:
User: asa//TestUser
Is authenticated: True
Authentication Type: Negotiate
Thread account name: asa//admin
Thread information:
Thread ID: 42
Thread account name: asa//admin
Is impersonating: False
Stack trace: at Microsoft.Crm.Application.Security.UserInformationIdentity.get_OrganizationId()
at Microsoft.Crm.CrmCache`1.InternalAddEntry(String cacheKey, Object value, String[] dependencyKeys, IOrganizationContext context)
at Microsoft.Crm.CrmCache`1.AddEntryNoLock(String key, TValue value, String[] dependencyKeys, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntityFromLookupInternal(String key, TValue value, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookupCallback(String key, TValue value, IOrganizationContext context, Object parameter)
at Microsoft.Crm.CrmCache`1.AddEntry(String key, TValue value, IOrganizationContext context, AddEntryCallback`1 callback, Object callbackParameter)
at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookup(String key, TValue value, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Application.Themes.Theme.get_Current()
at ASP.devorg__common_styles_theme_css_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)