У меня есть web.config
:C# WCF web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<authentication mode="Windows"/>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="InstantMessagingBinding" closeTimeout="00:10:00">
<textMessageEncoding>
<readerQuotas maxStringContentLength="200000" maxArrayLength="200000" />
</textMessageEncoding>
<httpTransport keepAliveEnabled="false" maxReceivedMessageSize="200000" authenticationScheme="Ntlm"/>
</binding>
</customBinding>
</bindings>
...
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Я хочу, чтобы моя служба читать closeTimeOut
из этого файла. Я знаю, как читать из раздела AppSetting
, но я не знаю, как это сделать здесь.
Вы можете вставить узел вашего web.config? –
Попробуйте показать код хостинга –