Could not load file or assembly SystemServiceModelDomainServicesHosting Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies The system cannot find the file specified

Could not load file or assembly SystemServiceModelDomainServicesHosting Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies The system cannot find the file specified


Ria Service Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies. The system cannot find the file specified

Understand why are you getting "Could not load file or assembly " error on production server or development machine.

http://www.revenmerchantservices.com/post/2010/09/16/could-not-load-file-or-assembly.aspx
 


Quick Fix

This dll System.ServiceModel.DomainServices.Hosting is a part of RIA services SDK.

RIa Services from Microsoft download center. Choose your appropriate version.

You need to install it on server. Below is url to download.

http://www.silverlight.net/learn/advanced-techniques/wcf-ria-services/get-started-with-wcf-ria-services



http://www.microsoft.com/downloads/details.aspx?FamilyID=7b43bab5-a8ff-40ed-9c84-11abb9cda559&displaylang=en

Aanother way.

Before publising web, right click on assembly references and look at the properties of it.
set Copy Local to true. This will reference the assembly from bin instead of GAC.

As soon as you build your project, you will see those assemblies in bin folder copied from GAC.

If you would like to browse the GAC and copy dll manually, you can reffer below TIP.
http://www.revenmerchantservices.com/ajax/systemwebextensions.html

 

Tags:

Asp.net File UploadMembership ProviderASP.net File Handlingcould not load file or assemblyasp net image uploadAsp.net delete file file on Server C#.net and VB.net codeC# Delete All Files In DirectoryC#- how to download file (Vb.net)C# Get File SizeGridview select emailC# SystemIOFileReadAllLines() method

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.