This operation returned because the timeout period expired. (Exception from HRESULT: 0x800705B4)

Khakindra Devkota 1 Reputation point
2020-10-28T07:55:51.09+00:00

While executing following code exception occurred at production environment.
CompilerResults cr = provider.CompileAssemblyFromSource(cp, code.ToString());
35676-image.png
Exception Details:-
Message: This operation returned because the timeout period expired. (Exception from HRESULT: 0x800705B4)
StackTrace:
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,841 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,621 Reputation points
    2020-10-29T05:40:44.153+00:00

    Hi Khakindra Devkota,
    Based on the error description, I suggest you perform a clean boot.
    Please follow the steps below:

    1. Open Run window by pressing the Windows + R key at a time
    2. In the run box type msconfig in the search field and hit Enter
    3. Click on the services tab
    4. Now make sure to tick on Hide all Microsoft services
    5. Finally, click on Disable all button
    6. Restart your System and check if the error still occurs
      More details you can refer to this document.
      Best Regards,
      Daniel Zhang

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.