Open AlexandrePitaDTT opened 3 days ago
@AlexandrePitaDTT this is very typical of a server that does not have the required assembly bindings in its machine.config file. Can you please double check that you completed the step below on all the SharePoint servers in the farm: https://entracp.yvand.net/docs/usage/installation/#set-the-assembly-bindings
Hi @Yvand, thank you for your quick response.
I already double-checked the assembly bindings in the machine config file, and I have the same configuration inside the runtime tag of https://github.com/Yvand/EntraCP/blob/master/assembly-bindings.config. I also copied the configuration that I have in my dev environment, that it's working, and paste it to machine.config of prod, and still I have the issue.
In the morning, SharePoint was updated, and the server restarted, and now I don't have the statck trace anymore in the XML object, and it seems that was fixed. Even I update the configuration of EntraCP, doesn't appear the stack trace again. That's good.
However, I still have the error: Unexpected [EntraCP] Unexpected error while refreshing configuration: TypeInitializationException: The type initializer for 'Microsoft.Kiota.Serialization.Json.KiotaJsonSerializationContext' threw an exception every time I query users from my application.
@AlexandrePitaDTT can you try load the standalone page TroubleshootEntraCP.aspx ? This page will validate if the dependent assemblies load correctly. By default it is available only in the central administration > Security, but you can easily copy it to the LAYOUTS folder of SharePoint, on any server, to call it from any SharePoint web app / site.
Hi, I installed EntraCP with version 26.0.20240627 in Sharepoint. I have installed this version in 2 environments, dev and prod. The EntraCP is working fine in dev; however, in prod, an error occurs when it tries to look up users.
Every time I do ProcessQuery to find users I get a "Not Found Users" empty list, however, there are users and the query should return a list with users. Watching the logs I notice that an exception always happens when the ProcessQuery it's trigger.
Error log:
10/18/2024 15:57:29.95 w3wp.exe 0x1EB4 EntraCP Augmentation 1337 Medium [EntraCP] Augmented user '---@---.com' with 10 groups in 445 ms f0245ba1-bfd8-c0d7-6283-49ca8ee08c16
10/18/2024 15:57:48.94 w3wp.exe 0x03D4 EntraCP Core 1337 Medium [EntraCP] Settings have new version 11051637, refreshing local copy f5245ba1-df83-c0d7-6283-46cbe4e0a190
10/18/2024 15:57:49.12 w3wp.exe 0x03D4 EntraCP Core 1337 Unexpected [EntraCP] Unexpected error while refreshing configuration: TypeInitializationException: The type initializer for 'Microsoft.Kiota.Serialization.Json.KiotaJsonSerializationContext' threw an exception. f5245ba1-df83-c0d7-6283-46cbe4e0a190
I analyzed more what could be the problem and found a curious thing. Doing a Select query of EntraCP configuration in SQL SERVER i found an xml object with an stacktrace, that I believe represents an error.
SQL Query: SELECT Id, Name, cast (properties as xml) AS XMLProps FROM Objects WHERE Name = 'EntraCPConfig' XML StackTrace:
at Microsoft.SharePoint.Administration.LastUpdateInfo.Initialize() at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure) at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.PutObject(SPPersistedObject persistedObject, Boolean ensure) at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdateCore(Boolean legacyUpdate) at Yvand.EntraClaimsProvider.Configuration.EntraIDProviderConfiguration.Update() at Yvand.EntraClaimsProvider.Configuration.EntraIDProviderConfiguration.ApplySettings(IEntraIDProviderSettings settings, Boolean commitChangesInDatabase) at Yvand.EntraClaimsProvider.Administration.EntraCPUserControl.CommitChanges() at Yvand.EntraClaimsProvider.Administration.GlobalSettingsUserControl.UpdateConfiguration(Boolean commitChanges) at Yvand.EntraClaimsProvider.Administration.GlobalSettingsUserControl.BtnOK_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)**
The m_LastUpdatedTime is updated always when I make an update to the configuration of EntraCP, even in Sharepoint Central Administration or in Sharepoint Powershell.
I have no idea what could cause the issue, I have check from different environments, and the configuration of EntraCP it's the same. I don't know why this happen only in one Environment.