Could not find assembly System.ServiceModel

.net-3.5sharepoint

I'm deploying a webpart on sharepoint and getting some errors. The webpart consumes data from a Web Service and displays a chart using Microsoft Chart (Framework 3.5). When I try to acces it, I get the folowing error:

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)

I tried copying System.Servicemodel.dll to the bin folder and registering it on the GAC, but the error does not change.
Any idea?

Thanks

Best Answer

To expand on the above answers:

It does sound like your site is running on asp.net 2.x. Being that System.ServiceModel is a 3.x component, the assembly will not load. You will need to install 3.5 on the server, or if you already have it set IIS to run the site under 3.5

Related Topic