I recently encountered a strange problem in the SharePoint 2013 environment. The previous day, the SharePoint 2013 website was still good, but suddenly the website reported the page can't display 500 error: the given Assembly name or codebase, 'c: \ windows \ Microsoft. net \ Assembly \ gac_msil \ system. servicemodel \ v4.0 _ 4.0.0.0 _ b77a5c561934e089 \ system. servicemodel. dll ', was invalid.
Description: An unhandled exception occurred during the execution of the current Web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception details: system. io. fileloadexception: The given Assembly name or codebase, 'c: \ windows \ Microsoft. net \ Assembly \ gac_msil \ system. servicemodel \ v4.0 _ 4.0.0.0 _ b77a5c561934e089 \ system. servicemodel. dll ', was invalid.
Source error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack trace:
[FileLoadException: The given assembly name or codebase, ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll‘, was invalid.] System.ServiceModel.Activation.ServiceHttpModule.BeginProcessRequest(Object sender, EventArgs e, AsyncCallback cb, Object extraData) +0 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +556 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288 |
Version Information: Microsoft. NET Framework Version: 4.0.30319; ASP. NET version: 4.0.30319.20.51
I spent more than half a day investigating this problem and finally solving it. I would like to write out the solution to this problem, hoping to help my friends who have encountered similar problems.
The author later found that the service account in this environment was inexplicably removed from the local administrator group, which may be caused by Windows patches or domain security policies.
No matter how the problem is caused or what the problem is, the author decisively adds the service account back to the local administrator group of all apps and web servers.
Then restart all IIS to solve the problem.
SharePoint 2013 error the given Assembly name or codebase system. servicemodel. dll was invalid