SOLVED

Error loading .Net application configuration after installing Windows 25th April KB5012643

%3CLINGO-SUB%20id%3D%22lingo-sub-3300227%22%20slang%3D%22en-US%22%3EError%20loading%20.Net%20application%20configuration%20after%20installing%20Windows%2025th%20April%20KB5012643%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3300227%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%20installing%20KB5012643%20(25th%20April%20Update)%20in%20a%20couple%20of%20Windows%2011%20PCs%2C%20we%20can't%20execute%20an%20application%20developed%20by%20our%20company.%20The%20application%20is%20Windows%20Forms%20Desktop%20.Net%203.5.%3C%2FP%3E%3CP%3E%3CU%3E%3CSTRONG%3EAs%20soon%20as%20we%20uninstall%20that%20package%2C%20the%20application%20runs%20without%20error.%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EThe%20error%20trace%20shows%20a%20problem%20loading%20the%20application%20configuration%20file%2C%20more%20specifically%2C%20it%20can't%20recognize%20%22system.serviceModel%22%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EException%20type%3A%20System.Configuration.ConfigurationErrorsException%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EMessage%3A%20Error%20en%20la%20inicializaci%C3%B3n%20del%20sistema%20de%20configuraci%C3%B3n%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3ESource%3A%20System.Configuration%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EStackTrace%3A%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ClientConfigurationSystem.EnsureInit(String%20configKey)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String%20sectionName)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String%20sectionName)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ConfigurationManager.GetSection(String%20sectionName)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ConfigurationManager.get_ConnectionStrings()%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Data.EntityClient.EntityConnection.ChangeConnectionString(String%20newConnectionString)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Data.Objects.ObjectContext..ctor(String%20connectionString%2C%20String%20defaultContainerName)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20AutoUpdate.Servidor.Data.EntityFrameWork.AutoUpdatev11Entities..ctor()%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20AutoUpdate.Servidor.Core.SeguridadGW..ctor()%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20AutoUpdate.Servidor.AppCliente.Program.Main()%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EInner%20Exception%20type%3A%20System.Configuration.ConfigurationErrorsException%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EMessage%3A%20Secci%C3%B3n%20de%20configuraci%C3%B3n%20no%20reconocida%20system.serviceModel.%20(C%3A%5CProgram%20Files%20(x86)%5CConsoft%5CConsoft%20Gestor%20AutoUpdate%5CGestor%20AutoUpdate.exe.Config%20line%20113)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3ESource%3A%20System.Configuration%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EStackTrace%3A%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean%20ignoreLocal)%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()%3C%2FP%3E%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3E%26nbsp%3B%26nbsp%3B%20en%20System.Configuration.ClientConfigurationSystem.EnsureInit(String%20configKey)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%3F%20Somebody%20with%20similar%20problems%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJose%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3300227%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EConfiguration%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301104%22%20slang%3D%22de-DE%22%3ESubject%3A%20Error%20loading%20.Net%20application%20configuration%20after%20installing%20Windows%2025th%20April%20KB5012643%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301104%22%20slang%3D%22de-DE%22%3E%3CP%3EWe%20have%20the%20same%20problem.%20Is%20there%20a%20solution%20or%20workaround%20to%20solve%20this%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301162%22%20slang%3D%22en-US%22%3EBetreff%3A%20Error%20loading%20.Net%20application%20configuration%20after%20installing%20Windows%2025th%20April%20KB5012643%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301162%22%20slang%3D%22en-US%22%3EI%20have%20compared%20the%20machine.config%20file%20(C%3A%5CWindows%5CMicrosoft.NET%5CFramework64%5Cv2.0.50727%5CCONFIG)%20before%20KB5012643%20and%20after%2C%20and%20I%20can%20see%20that%20following%20sectiongroups%20have%20disappeared%3A%3CBR%20%2F%3E%3CSECTIONGROUP%20name%3D%22%26quot%3Bsystem.runtime.serialization%26quot%3B%22%20...%3D%22%22%3E%3CBR%20%2F%3E%3CSECTIONGROUP%20name%3D%22%26quot%3Bsystem.serviceModel%26quot%3B%22%20...%3D%22%22%3E%3CBR%20%2F%3E%3CSECTIONGROUP%20name%3D%22%26quot%3Bsystem.serviceModel.activation%26quot%3B%22%20...%3D%22%22%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20copied%20that%20sections%20from%20the%20backup%20machine.config%20file%20and%20now%20it%20appears%20another%20error%20message%20when%20I%20try%20to%20execute%20my%20application%3A%3CBR%20%2F%3E%22Could%20not%20load%20file%20or%20assembly%20System.Runtime.Serialization%20version%3D3.0.0.0%20...%20publickeytoken%3Db77a5c561934e089%22%3CBR%20%2F%3E%3CBR%20%2F%3EI%20opened%20GAC_MSIL%20folder%20and%20I%20can%20see%20that%20following%20folders%20are%20empty%3A%3CBR%20%2F%3EC%3A%5CWindows%5Cassembly%5CGAC_MSIL%5CSystem.Runtime.Serialization%5C3.0.0.0__b77a5c561934e089%3CBR%20%2F%3EC%3A%5CWindows%5Cassembly%5CGAC_MSIL%5CSystem.ServiceModel%5C3.0.0.0__b77a5c561934e089%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20idea%20of%20how%20to%20restore%20that%20folders%3F%3CBR%20%2F%3E%3CBR%20%2F%3EJose%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSECTIONGROUP%3E%3C%2FSECTIONGROUP%3E%3C%2FSECTIONGROUP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301252%22%20slang%3D%22en-US%22%3EBetreff%3A%20Error%20loading%20.Net%20application%20configuration%20after%20installing%20Windows%2025th%20April%20KB5012643%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301252%22%20slang%3D%22en-US%22%3EI%20finally%20restored%20GAC_MSIL%20unexpected%20files%20uninstalling%20.Net%20Framework%203.5%20and%20reinstalling%20it%20from%20Control%20Panel%20-%26gt%3B%20Programs%20%26amp%3B%20features%20-%26gt%3B%20Add%2Fremove%20Windows%20features%3CBR%20%2F%3EAfter%20reinstalling%20.Net%20Framework%203.5%20the%20application%20is%20now%20working.%3C%2FLINGO-BODY%3E
Contributor

After installing KB5012643 (25th April Update) in a couple of Windows 11 PCs, we can't execute an application developed by our company. The application is Windows Forms Desktop .Net 3.5.

As soon as we uninstall that package, the application runs without error.

The error trace shows a problem loading the application configuration file, more specifically, it can't recognize "system.serviceModel":

 

Exception type: System.Configuration.ConfigurationErrorsException

Message: Error en la inicialización del sistema de configuración

Source: System.Configuration

StackTrace:

   en System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

   en System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)

   en System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)

   en System.Configuration.ConfigurationManager.GetSection(String sectionName)

   en System.Configuration.ConfigurationManager.get_ConnectionStrings()

   en System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)

   en System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)

   en AutoUpdate.Servidor.Data.EntityFrameWork.AutoUpdatev11Entities..ctor()

   en AutoUpdate.Servidor.Core.SeguridadGW..ctor()

   en AutoUpdate.Servidor.AppCliente.Program.Main()

 

Inner Exception type: System.Configuration.ConfigurationErrorsException

Message: Sección de configuración no reconocida system.serviceModel. (C:\Program Files (x86)\Consoft\Consoft Gestor AutoUpdate\Gestor AutoUpdate.exe.Config line 113)

Source: System.Configuration

StackTrace:

   en System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)

   en System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()

   en System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

 

Any idea? Somebody with similar problems??

 

Thank you very much.

 

Jose

 

3 Replies

We have the same problem. Is there a solution or workaround to solve this issue?

I have compared the machine.config file (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG) before KB5012643 and after, and I can see that following sectiongroups have disappeared:
<sectionGroup name="system.runtime.serialization" ...
<sectionGroup name="system.serviceModel" ...
<sectionGroup name="system.serviceModel.activation" ...

I have copied that sections from the backup machine.config file and now it appears another error message when I try to execute my application:
"Could not load file or assembly System.Runtime.Serialization version=3.0.0.0 ... publickeytoken=b77a5c561934e089"

I opened GAC_MSIL folder and I can see that following folders are empty:
C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089
C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089

Any idea of how to restore that folders?

Jose


best response confirmed by joseparra (Contributor)
Solution
I finally restored GAC_MSIL unexpected files uninstalling .Net Framework 3.5 and reinstalling it from Control Panel -> Programs & features -> Add/remove Windows features
After reinstalling .Net Framework 3.5 the application is now working.