SharePoint 2013 error The given assembly name or codebase System.ServiceModel.dll was invalid

时间:2022-12-07 17:06:06

笔者近期在 SharePoint 2013 的环境中遇到一个奇怪的问题,前一天 SharePoint
2013 站点还是好好的。可是突然站点就报page can't display 500 错误:

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.19051

笔者花了大半天时间来调研这个问题,终于解决问题。特此将该问题的解决方法写出来 ,希望能够给碰到类似问题的朋友有所帮助 。

笔者后来发现这个环境里的服务帐号莫名奇异地被移出了本地管理员组。貌似不是人为的,可能是Windows 补丁或域安全策略导致的 。

无论是如何造成的。知道什么问题就好。笔者果断将服务帐号加回到全部 App 和 Web server的本地管理员组。

然后重新启动全部的IIS ,问题就攻克了 。

版权声明:本文博主原创文章,博客,未经同意不得转载。