Method not found: '!! 0 [] System.Array.Empty ()'

10,195

Solution 1

I solved problem as below:

  1. Download and install windows updates.
  2. After , install .net 4.6.2

Solution 2

Check this: https://msdn.microsoft.com/en-us/library/ms366723.aspx?f=255&MSPPError=-2147217396

On the first request the IIS will try to precompile the code files and the webpages. If you are using Array.Empty in (.aspx or a .cs file in the App_Code directory .. etc) and there is no .net 4.6 installed on the server, the exception will be raised.

Share:
10,195
Mehmet Topçu
Author by

Mehmet Topçu

I am a computer engineer.

Updated on June 23, 2022

Comments

  • Mehmet Topçu
    Mehmet Topçu almost 2 years

    I have IIS 8.5 version. And my web api project framework is .Net 4.6 . I publish the web api and it is work on local iis express or my computer(windows 8.1) iis. But when I publish the api on windows server r2 2012 iis and when I click browse, I get below error.

    Note: server iis version is same as my computer version.

    Server Error in '/' Application.

    Method not found: '!! 0 [] System.Array.Empty ()'.

    Explanation: An unhandled exception occurred while executing the current web request. Please review the stack trace to find out more about the error and where it originates in the code.

    Exception Details: System.MissingMethodException: Method not found: '!! 0 [] System.Array.Empty ()'.

    enter image description here

  • Mehmet Topçu
    Mehmet Topçu over 6 years
    thanks for answer , I am loading essential updates to install .net 4.6 now. Then probably problem will be fixed