Overview
If Azure AD authentication fails when attempting to log into M-Files Web and the following error is logged, the .NET framework on the server computer may need to be updated.System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
Full error message:
System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
at MFiles.AuthenticationProviders.OAuth.OAuthClient.MakeRequest(String verb, String contentType, String uri, Stream body, Boolean fullLogging, Dictionary`2 httpHeaders, Boolean includeExpect100Continue)
at MFiles.AuthenticationProviders.OAuth.OAuthClient.MakeRequest[ResultType](String verb, String contentType, String uri, Stream body, Boolean fullLogging, Dictionary`2 httpHeaders, ResultType& result)
at MFiles.AuthenticationProviders.OAuth.OAuthHttpHandler.ReadAuthenticationRequest(HttpContext context, String lastSegment)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously
Solution
These errors may be resolved by updating the .NET framework on the server computer where M-Files is hosted. The same solution applies to any feature / operation that fails due to the below error as the error is commonly due to an incompatible .NET framework version.
System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()
