You might have encountered Access Denied Errors with KB4340558 on your System. This update is buggy so Microsoft Stopped Pushing KB4340558 July 2018 .NET Framework Updates but a majority of users has already installed the patch. If you are getting the issues after installing the Security and Quality Rollup updates for .NET Framework the follow the solutions in the following part.
Access Denied Errors with KB4340558 occurs because applications that rely on .NET Framework to initialize a COM component and that run with restricted permissions may fail to start properly. The .NET Framework runtime executes the process token to determine if the process is being run within an elevated environment. These system calls may not work when the required process inspection permissions don’t exist. This causes an “access denied” error with KB4340558 on Windows 10, 8 or 7. Generally, you get Access denied, Class not registered, or Internal failure occurred for unknown reasons errors in this situation. The most common message will be – Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Access Denied Errors with KB4340558 Solutions
Here is how to fix Access Denied Errors with KB4340558 in Windows 10, 8, 7 –
Step-1: If you have experienced this problem then start and run the process with PROCESS_QUERY_INFORMATION permission.
Step-2: Once you receive Access Denied Errors with KB4340558 there is a chance to encounter an ActiveX component can’t create object error for “IIS Hosted Classic ASP calling CreateObject for .NET COM objects”. So you can follow either of the 2 solutions below –
When a site uses Anonymous Authentication –
Alter the “Web Site Anonymous Authentication credentials” to use the “Application pool identity”.
When a web site uses Windows Authentication or Basic Authentication –
Sign in to the application at this time as the application pool identity, then create an instance of the .NET COM component.
Subsequently, additional site users will be able to start the .NET COM component without the failure.
Otherwise, if you are taking help of Windows Authentication and opening the website from the console of the Windows Server where the ASP application runs then –
If you create an instance of the .NET COM component this will also resolve the same error for other site users.
You may find error “0x80040154 (REGDB_E_CLASSNOTREG)”. This message appears when .NET framework creates instance of .NET COM application under an Impersonation Context.
- In this situation, create an instance of the .NET COM component in advance of the impersonation context call. Subsequently impersonated create instance calls perform as expected.
Use the .NET Application in the context of the impersonated user.
Take care to evade using Impersonation when creating the .NET COM object.
- If User Account Control is disabled for the system, re-enable it.
- When the process is unable to load diasymreader.dll, run the underneath command for the assembly:
ngen install <the failing assembly>
Warning: The following solutions may make a system or a network more vulnerable to attack by malicious users or by software such as viruses. So Microsoft does not suggest these but they are giving details about workarounds to run on your own risk.
- Add NETWORK SERVICE to the local Administrators group.
- For the time being, uninstall KB4340558 to restore functionality until a new update is released to resolve this issues.