我在IIS上托管了这个WCF服务 . 当我尝试使用下面的代码在我的客户端项目中使用它时,我得到以下异常“发送请求时发生错误”

LaunchService.LaunchServiceClient launchServiceClient =
            new LaunchService.LaunchServiceClient(
            new BasicHttpBinding(),
            new EndpointAddress("http:// Service base address"));

如果我在上面的代码中将 BasicHttpBinding() 更改为 WebHttpBinding() (如在我的web.config文件中),我收到此错误

“System.TypeLoadException:'无法从程序集'System.ServiceModel.Web,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'加载类型'System.ServiceModel.WebHttpBinding' . '”

使用默认构造函数时,我收到此错误

“System.PlatformNotSupportedException:'不支持配置文件 . ”LaunchService.LaunchServiceClient launchService = new LaunchService.LaunchServiceClient();

我尝试更改Web配置文件中的设置,但其中的任何更改都不会使服务工作 .

有帮助吗?

提前致谢..