Silverlight 已超过传入邮件的最大邮件大小配额(65536)
我有一个silverlight应用程序正在调用另一个项目中的WCF服务(相同的解决方案) 问题是我得到了非常常见的错误65536 我已经阅读了大量的文章,我尝试了所有的方法,仍然能得到这个信息 这是我的网络服务Silverlight 已超过传入邮件的最大邮件大小配额(65536),silverlight,wcf,Silverlight,Wcf,我有一个silverlight应用程序正在调用另一个项目中的WCF服务(相同的解决方案) 问题是我得到了非常常见的错误65536 我已经阅读了大量的文章,我尝试了所有的方法,仍然能得到这个信息 这是我的网络服务 <system.web> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> <httpRuntime maxRequestLength=
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="2147483647"/>
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="ServiceBehavior" name="MyRemoteHostService">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_MyRemoteHostService"
contract="MyServiceReference.MyRemoteHostService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"
multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_MyRemoteHostService"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647">
<readerQuotas maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxDepth="2147483647"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
这是我的客户端servicerences.ClientConfig
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="2147483647"/>
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_MyRemoteHostService"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:05:00"
sendTimeout="00:02:00"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None"></security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:2622/MyRemoteHostService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_MyRemoteHostService"
contract="MyServiceReference.MyRemoteHostService"
name="BasicHttpBinding_MyRemoteHostService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</client>
</system.serviceModel>
查看客户端配置文件。我怀疑这就是您的错误产生的原因。查看客户端配置文件。我怀疑这就是您的错误产生的原因。尝试以下方法:
<binding name="higherMessageSize" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
</binding>
试试这个:
<binding name="higherMessageSize" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
</binding>
我发现了问题;未在服务名称中设置命名空间
<service behaviorConfiguration="ServiceBehavior" name="MyRemoteHostService">
改为
<service behaviorConfiguration="ServiceBehavior" name="My.Framework.Web.MyRemoteHostService">
我发现了问题;未在服务名称中设置命名空间
<service behaviorConfiguration="ServiceBehavior" name="MyRemoteHostService">
改为
<service behaviorConfiguration="ServiceBehavior" name="My.Framework.Web.MyRemoteHostService">
谢谢用户958015我用与您相同的方法解决了这个问题,我在web服务端没有这个部分
<services>
<service behaviorConfiguration="ServiceBehavior" name="MyRemoteHostService">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_MyRemoteHostService"
contract="MyServiceReference.MyRemoteHostService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
silverlight中不存在“readerQuotas”属性,您只需确保在web服务和客户端中具有相同的属性,并确保在web服务端写入名称和名称空间谢谢用户958015,我用与您相同的方法解决了它,我在web服务端没有此部分
<services>
<service behaviorConfiguration="ServiceBehavior" name="MyRemoteHostService">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_MyRemoteHostService"
contract="MyServiceReference.MyRemoteHostService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
silverlight中不存在“readerQuotas”属性,您只需确保在web服务和客户端中具有相同的属性,并确保在web服务端写入名称和名称空间已经有无数这样的问题了-您在发布另一个问题之前搜索了吗???请搜索!!我相信你会找到很多答案!!重复的问题和更多的问题…已经有无数的问题了-你在发布另一个问题之前搜索过了吗???请搜索!!我相信你会找到很多答案!!重复的,还有更多的问题,所以…客户端配置将所有内容设置为2147483647客户端配置将所有内容设置为2147483647这是传入的值,超出了限制,未收到…许多人说设置Ctrl+Shift+F,查找“65536”,查看整个解决方案。如果与客户端解决方案分开,则在服务解决方案中重复此操作。该值必须在某个地方。Ctrl+Shift+F,Find“65536”不会返回任何内容当我在ServiceReferences.ClientConfig中放置readerQuotas时,我得到元素“binding”具有无效的子元素“readerQuotas”。。。与maxBufferPoolSize类似,我得到的“maxBufferPoolSize”没有声明客户端配置将所有内容设置为2147483647客户端配置将所有内容设置为2147483647这是传入的值,超出了限制,没有收到…许多人说设置Ctrl+Shift+F,找到“65536”,查看整个解决方案。如果与客户端解决方案分开,则在服务解决方案中重复此操作。该值必须在某个地方。Ctrl+Shift+F,Find“65536”不会返回任何内容当我在ServiceReferences.ClientConfig中放置readerQuotas时,我得到元素“binding”具有无效的子元素“readerQuotas”。。。与maxBufferPoolSize类似,我在其中得到的“maxBufferPoolSize”并没有被声明。这在那里总是存在,maxStringContentLength和maxReceivedMessageSize都存在,maxStringContentLength和maxReceivedMessageSize都存在