Я только начинаю работу над WCF месяц назад. Пожалуйста, простите меня, если я попрошу что-то уже ответили. Сначала я пытаюсь выполнить поиск, но ничего не нашел.
Я прочитал эту статью, передача файлов WCF: потоковый и канал канала, размещенный в IIS. Он отлично работает. Теперь мне нравится интегрировать код на стороне клиента, чтобы быть частью моего приложения, которое является DLL, запущенной внутри AutoCAD. Если я хочу работать с конфигурационным файлом, мне нужно изменить acad.exe.config, который я не думаю, что это хорошая идея. Поэтому я думаю, что если это возможно, я хочу переместить весь код в файле конфигурации в код.
Вот конфигурационный файл:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://10.1.13.15:88/WCFStreamUpload/service.svc/ep1"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService"
contract="MGFileServerClient.IService"
name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
Не могли бы вы помочь мне внести это изменение?