У меня возникла странная проблема. Мое приложение mvc не хочет получать поток от службы wcf. С отправкой стрима все в порядке! Мой файл Client.dll.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicHttpStream" sendTimeout="00:05:00" messageEncoding="Mtom" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:61174/FileTransferService.svc"
binding="basicHttpBinding" bindingConfiguration="basicHttpStream"
contract="IFileTransferService" name="basicHttpStream" />
</client>
</system.serviceModel>
</configuration>
Клиент получает это сообщение: "multipart/related; type="application/xop+xml";start="http://tempuri.org/0";boundary="uuid:6fc3add5-b28f-4842-a944-0bb6c79d05c6+id=6";start-info="text/xml""
Я использую Autofac для создания канала:
builder
.Register(c => new ChannelFactory<IFileTransferService>(
new BasicHttpBinding(),
new EndpointAddress("http://localhost:61174/FileTransferService.svc"))).InstancePerLifetimeScope();
builder.Register(c => c.Resolve<ChannelFactory<IFileTransferService>>().CreateChannel())
.As<IFileTransferService>()
.UseWcfSafeRelease();
var a = _fileTransferService.DownloadFile(new ImageDownloadRequest(model.PhotoId));
- person user3818229   schedule 02.01.2016