コードに変換する必要があるapp.configセクションは次のとおりです。私はいくつかの例を見てきましたが、まだそれを動作させることはできません。誰でも助けてくれますか?このapp.config xmlをコードに変換しますか? (WCF)
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MyService"
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="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://server.com/service/MyService.asmx"
binding="basicHttpBinding" bindingConfiguration="MyService"
contract="MyService.MyServiceInterface"
name="MyService" />
</client>
</system.serviceModel>
私のユースケースは、私は他のnon-.netのアプリケーションで使用されるDLLを書いていますし、今後私はApp.configファイルを置くのには良い場所を持っていないということです。
ありがとうございます!
は、たぶん、あなたがこれまで持っているものを示し、そして人々は問題 –
@Sunny指摘しようとすることができます含めるためのおかげでXML、それを作るためのトリックは何ですか? – Eyvind