我正在 sharepoint 上部署 webpart 并遇到一些错误。 webpart 使用来自 Web 服务的数据并使用 Microsoft Chart (Framework 3.5) 显示图表。当我尝试访问它时,出现以下错误:
Could not load file or assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
StackTrace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
我尝试将 System.Servicemodel.dll 复制到 bin 文件夹并在 GAC 上注册它,但错误没有改变。
任何的想法?
谢谢
最佳答案
要扩展上述答案:
听起来您的网站确实在 asp.net 2.x 上运行。由于 System.ServiceModel 是 3.x 组件,因此不会加载程序集。您需要在服务器上安装 3.5,或者如果您已经将 IIS 设置为在 3.5 下运行站点
关于sharepoint - 找不到程序集 System.ServiceModel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/492921/