Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wcf 如何将SOAP数据大小限制提高到65536_Wcf - Fatal编程技术网

Wcf 如何将SOAP数据大小限制提高到65536

Wcf 如何将SOAP数据大小限制提高到65536,wcf,Wcf,i出现此错误“T*已超过传入邮件的最大邮件大小配额(65536)” 我最大化了maxReceivedMessageSize,但一切都不顺利 app.config是服务层,它是: <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="aspnet:UseTaskFriendlySynchronizationContext" value

i出现此错误“T*已超过传入邮件的最大邮件大小配额(65536)” 我最大化了maxReceivedMessageSize,但一切都不顺利 app.config是服务层,它是:

    <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- Lors du déploiement du projet de bibilothèque de services, le contenu du fichier de configuration doit être ajouté au fichier app.config  
  de l'hôte. System.Configuration ne prend pas en charge les fichiers de configuration des bibliothèques. -->
  <system.serviceModel>
    <services>
      <service name="Navigateur.SL.ParentService">
        <endpoint address="" binding="basicHttpBinding" contract="Navigateur.SL.IParentService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service1/" />
          </baseAddresses>
        </host>
      </service>
      <service name="Navigateur.SL.VideoService">
        <endpoint address="" binding="basicHttpBinding" contract="Navigateur.SL.IVideoService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service2/" />
          </baseAddresses>
        </host>
      </service>
      <service name="Navigateur.SL.EnfantService">
        <endpoint address="" binding="basicHttpBinding" contract="Navigateur.SL.IEnfantService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service3/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- Pour éviter la divulgation d'informations de métadonnées, 
          définissez les valeurs ci-dessous sur false avant le déploiement -->
          <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
          <!-- Pour recevoir les détails de l'exception dans les erreurs à des fins de débogage, 
          définissez la valeur ci-dessous sur true.  Pour éviter la divulgation d'informations d'exception, 
          définissez-la sur false avant le déploiement -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <connectionStrings>
    <add name="FamissimaEntities" connectionString="metadata=res://*/NavigateurModel.csdl|res://*/NavigateurModel.ssdl|res://*/NavigateurModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=HP\SQLEXPRESS;initial catalog=Famissima;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

表示层中的app.config是:

    <?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
      <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IParentService" maxReceivedMessageSize="1000000" />
                <binding name="BasicHttpBinding_IVideoService" maxReceivedMessageSize="1000000"/>
                <binding name="BasicHttpBinding_IEnfantService" maxReceivedMessageSize="1000000"/>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service1/"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IParentService"
                contract="ServiceReferenceParent.IParentService" name="BasicHttpBinding_IParentService" />
            <endpoint address="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service2/"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IVideoService"
                contract="ServiceReferenceVideo.IVideoService" name="BasicHttpBinding_IVideoService" />
            <endpoint address="http://localhost:8733/Design_Time_Addresses/Navigateur.SL/Service3/"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEnfantService"
                contract="ServiceReferenceEnfant.IEnfantService" name="BasicHttpBinding_IEnfantService" />
        </client>
    </system.serviceModel>
</configuration>


有人能帮帮我吗

为了处理大数据量,您应该具有ServiceBehavior并将maxItemsInObjectGraph设置为如下所示

      <endpointBehaviors>
        <behavior name="SilverlightWCFLargeDataApplication">
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehavior>

无论如何,谢谢你,我在客户端更改了th app.config,它确实工作正常name=“BasicHttpBinding\u IParentService”sendTimeout=“00:05:00”maxBufferPoolSize=“2147483647”maxBufferSize=“2147483647”maxReceivedMessageSize=“2147483647”