我有一個WCF測試問題,並且當我移動到system.servicemodel的頂部時,問題就解決了。 我的問題是,爲什麼這很重要? .NET不是按字段名讀取XML的?爲什麼它關係app.config中的哪些訂單設置
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<!-- Server-->
<binding
name="ws"
transferMode="Streamed"
messageEncoding="Mtom"
maxReceivedMessageSize="10067108864"
maxBufferSize="500000"
maxBufferPoolSize="500000"
receiveTimeout="10:00:00"
sendTimeout="10:00:00"
closeTimeout="10:00:00"
openTimeout="10:00:00">
<readerQuotas
maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
<!-- Server -->
<binding
name="FileTransferServicesBinding"
transferMode="Streamed"
messageEncoding="Mtom"
maxReceivedMessageSize="10067108864"
maxBufferSize="500000"
maxBufferPoolSize="500000">
<readerQuotas
maxDepth="32"
maxStringContentLength="655360"
maxArrayLength="655360"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
</bindings>
<!-- Server -->
<services>
<service behaviorConfiguration="MyServiceTypeBehaviors" name="Namespace.Namespace">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="FileTransferServicesBinding" contract="Namespace.INamespaceSC" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8081/Namespace" />
</baseAddresses>
</host>
<endpoint address="mex" binding="mexHttpBinding" contract="Namespace.INamespaceSC" />
</service>
</services>
<!-- Behaviors field was here before, when it didn't work -->
<!-- Client -->
<client>
<endpoint
address="http://localhost:8081/Namespace"
binding="basicHttpBinding"
bindingConfiguration="ws"
contract="Namespace.INamespaceSC"
/>
</client></system.serviceModel>
你能告訴我們原始的和修改的配置文件嗎? – 2009-09-15 07:16:22