相关疑难解决方法(0)

已超出传入邮件的最大邮件大小限额(65536)

我为几个表创建范围时得到了这个异常,所有这些表都是巨大的设计

<bindings>
    <wsHttpBinding>
        <binding name="wsHttpBinding_ISyncServices" closeTimeout="00:10:00"
            openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
            transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
            <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
                maxArrayLength="2147483647" maxBytesPerRead="2147483647"
                maxNameTableCharCount="2147483647" />
            <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
            <security mode="Message">
                <transport clientCredentialType="Windows"
                    proxyCredentialType="None" realm="">
                    <extendedProtectionPolicy policyEnforcement="Never" />
                </transport>
                <message clientCredentialType="Windows"
                    negotiateServiceCredential="true" algorithmSuite="Default" />
            </security>
        </binding>
    </wsHttpBinding>
</bindings>
Run Code Online (Sandbox Code Playgroud)

我已经做到MaxReceivedMessageSize2147483647,但它仍然在这条线下给我以下例外

 client.GetTableDescription(scopeName, syncTable)
Run Code Online (Sandbox Code Playgroud)

已超出传入邮件的最大邮件大小限额(65536).
要增加配额,请在相应的绑定元素上使用MaxReceivedMessageSize属性.

wcf basichttpbinding

66
推荐指数
6
解决办法
9万
查看次数

WCF错误"对象图中可以序列化或反序列化的最大项目数为'65536'"

我在WCF调用上收到以下错误:

在对象图中可以序列化或反序列化的最大项数是'65536'

我已经阅读了大量的论坛帖子,其中许多人提到修改app.config和web.config以指定允许更大对象图的新行为.我已经做到了,这就是我在这些文件中所拥有的:

关于WPF项目的App.Config:

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="">
      <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
    </behavior>

  </endpointBehaviors>

</behaviors>

<services>
  <service name="digiPM.Shell.LogOutPMSEMRService.PMSEMRLogOutService">
    <!--<endpoint address="" binding="basicHttpBinding" contract="digiPM.Shell.LogOutPMSEMRService.IPMSEMRLogOutService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8732/Design_Time_Addresses/digiPM.Shell.LogOutPMSEMRService/PMSEMRLogOutService/" />
      </baseAddresses>
    </host>-->
    <endpoint address="" binding="netTcpBinding" name="NetTcpBindingEndpoint" contract="digiPM.Shell.LogOutPMSEMRService.IPMSEMRLogOutService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="MexTcpBidingEndpoint" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:8732/Design_Time_Addresses/digiPM.Shell.LogOutPMSEMRService/PMSEMRLogOutService/" />
      </baseAddresses>
    </host>
  </service>
</services>

<!--binding info - …
Run Code Online (Sandbox Code Playgroud)

.net wcf datacontractserializer servicebehavior xmlserializer

13
推荐指数
3
解决办法
4万
查看次数

Wcf - 是否已超出传入邮件的最大邮件大小限额(65536)?

已超出传入邮件的最大邮件大小限额(65536).要增加配额,请在相应的绑定元素上使用MaxReceivedMessageSize属性.

<system.serviceModel>

<services>
  <service name="FileService.Service1" behaviorConfiguration="FileService.Service1Behavior">
    <host>
      <baseAddresses>
        <add baseAddress = "http://localhost:8732/Design_Time_Addresses/FileService/Service1/" />
      </baseAddresses>
    </host>
    <!-- Service Endpoints -->
    <!-- Unless fully qualified, address is relative to base address supplied above -->
    <endpoint address ="" binding="wsHttpBinding" contract="FileService.IService1">
      <!-- 
          Upon deployment, the following identity element should be removed or replaced to reflect the 
          identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
          automatically.
      -->
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>
    <!-- Metadata Endpoints -->
    <!-- The …
Run Code Online (Sandbox Code Playgroud)

asp.net wcf

12
推荐指数
1
解决办法
5万
查看次数

WCF:更新服务参考提供重复的配置条目

我有一个WPF应用程序,它使用对WCF服务的服务引用。在更新服务时,我需要更新服务参考,因此我右键单击它,然后单击“更新服务参考”。

这样做会导致客户端项目的App.config文件中出现重复的条目。

  • 它在wsHttpBinding下复制了绑定-在名称中添加了一个后缀编号相等的条目WSHttpBinding_ISomeService --> WSHttpBinding_ISomeService1
  • 并且它在绑定下复制端点定义,以便每个wsHttpBinding有一个端点。除名称外,这也是纯副本。

为什么要复制配置?它不只是应该更新名称吗?我该如何停止呢?

configuration wcf app-config service-reference

5
推荐指数
1
解决办法
2876
查看次数

将大型XML从Silverlight发送到WCF

我想从Silverlight向WCF SVC服务发送一个大的XML字符串.

看起来大约50k以下的任何东西都被正确发送但是如果我尝试发送超过该限制的东西,我的请求到达服务器(调用BeginRequest)但从未到达我的SVC.我得到了经典的"NotFound"异常.

关于如何提高这个限制的任何想法?

如果我不能提高它?我还有什么其他选择?

这是我的绑定配置

<bindings>
        <customBinding>
            <binding name="customBinding0" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
                <binaryMessageEncoding>
        <readerQuotas
            maxArrayLength="2147483647"
            maxBytesPerRead="2147483647"
            maxDepth="2147483647"
            maxNameTableCharCount="2147483647"
            maxStringContentLength="2147483647" />

      </binaryMessageEncoding>
                <httpTransport/>
            </binding>
            <binding name="customBindingSecure" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
                <binaryMessageEncoding>
        <readerQuotas
            maxArrayLength="2147483647"
            maxBytesPerRead="2147483647"
            maxDepth="2147483647"
            maxNameTableCharCount="2147483647"
            maxStringContentLength="2147483647" />
                </binaryMessageEncoding>
                <httpsTransport/>
            </binding>
        </customBinding>
    </bindings>
Run Code Online (Sandbox Code Playgroud)

编辑:更多细节:如果我打破Global.asax Endrequest,我在响应"Bad Request 400"中看到

编辑:再次提供更多详细信息:我激活了跟踪,我可以看到以下错误:已超出传入邮件的最大邮件大小配额(65536).要增加配额,请在相应的绑定元素上使用MaxReceivedMessageSize属性.

但是,我的maxReceivedMessageProperty已设置为2147483647.

.net silverlight wcf

5
推荐指数
1
解决办法
9350
查看次数

.NET 4 WCF 内存问题

我遇到的问题是,我的ASP.NET 4 MVC 2 + WCF应用程序在负载测试期间使用Windows 2008 64 位应用程序中的大量内存,运行几分钟后它将耗尽几乎所有可用内存(8 GB) (我们做了有几个工作进程在运行)。

使用ANTS Memory Profiler进行分析后,它显示了一些有趣的结果:

  1. .NET 托管内存从 15 MB 增加到 40 MB,但这归因于我们在程序中所做的缓存机制。然而.NET本身分配了近180 MB的可用空间,这是出乎意料的。
  2. 非托管内存大小显着增加,直到负载测试运行大约 3 分钟后达到 120 MB(尽管我们的应用程序没有显式使用任何 P/Invoke 或 COM 对象。但是,我们确实使用了一些 COM+ 对象,这些对象在finally 中使用后被释放)堵塞)。
  3. 记忆变得支离破碎。
  4. 上面的第 1 和第 2 项导致整个应用程序在负载测试运行几分钟后使用大约 350 MB ,但如果我们不停止测试,它将继续进一步增长。

根据上面的第1项,我测试了一些应用程序来测试问题是否是由于我们的应用程序或WCF引起的。测试应用程序只是将 XML 数据(约 300KB)加载到多线程应用程序中的数据集。当逻辑存储在 EXE 程序中时,应用程序在完成后仅使用 24 MB 专用字节中的 200 KB(从开始时额外使用 120 KB,其中 40 KB 用于未使用的内存)托管内存(这是可以接受的);但是当逻辑托管在 WCF 中时,应用程序使用 66 MB 托管内存(从 64 MB 空闲/未使用的托管内存开始额外使用 61 MB)。所以看来 …

.net wcf garbage-collection memory-management

5
推荐指数
1
解决办法
7896
查看次数

mscorlib.dll中发生了未处理的"System.ServiceModel.CommunicationException"类型异常

我在Web服务中调用方法时遇到以下错误,而不是由我开发.

mscorlib.dll中发生了未处理的"System.ServiceModel.CommunicationException"类型异常

它不仅发生在我的本地开发机器上,而且发生在部署软件时也发生在客户端的服务器上.

我目前正在使用Visual Studio 2010.

visual-studio-2010 mscorlib c#-4.0

4
推荐指数
1
解决办法
3万
查看次数

System.ServiceModel.QuotaExceededException

嗨,当应用程序托管在服务器中时,我遇到以下错误。该应用程序在本地计算机上运行良好。“超出了传入消息的最大消息大小配额(100000000)。要增加配额,请在适当的绑定元素上使用MaxReceivedMessageSize属性。”

完成所有搜索后就解决了WCF问题,但是在这里我没有使用任何WCF服务。

请帮我解决一下这个。

.net c#

4
推荐指数
2
解决办法
4943
查看次数