1

I have a plain old wcf service that I tried to deploy to my hosting service. When I try to access my service on the remote server I get "Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting'" I searched my project for any references to that .dll (and system.web.ria) and there are none, which I believe is correct. To be clear, I never tried to configure my wcf service to use ria, so I don't know how my project even knows such a thing exists.

I have a silverlight client that accesses this service but I do not (intentionally) use RIA services on the client or the server. My service is (or should be) plain old wcf - I generate client side proxies using slsvcutil and it works fine on my development machine.

Do I need RIA services to access my wcf service with silverlight? How do I get rid of this error without deploying ria services? I do not want to use ria services unless I have too.

Thank you.

4

1 回答 1

3

您不需要 RIA 服务即可使用 Silverlight 访问 wcf 服务。再次检查您的解决方案。但是,为了摆脱这个错误而不在服务器上安装 ria 服务,

如果您使用 Visual Studio Build->Publish 选项来部署应用程序,请确保System.ServiceModel.DomainServices.HostingWeb Application->References 下的程序集已标记为Copy Local = True

如果您要手动将这些位复制到部署服务器,请将上述程序集复制到您旁边的 Web 应用程序 BIN 文件夹中[WebAppName].dll

根据http://blogs.msdn.com/saurabh/archive/2010/03/16/ria-services-application-deployment.aspx

于 2013-09-03T03:47:45.230 回答