silverlight – 发送大字节数组时出错

silverlight – 发送大字节数组时出错,第1张

概述我有WCF服务,通过它我在DB中添加数据.它工作正常,但当我尝试发送大字节[]时,它返回“远程服务器返回错误:NotFound”. web.config中 <?xml version="1.0"?><configuration> <connectionStrings> <add name="JabsBaseConnectionString" connectionString="Dat 我有WCF服务,通过它我在DB中添加数据.它工作正常,但当我尝试发送大字节[]时,它返回“远程服务器返回错误:NotFound”.

web.config中

<?xml version="1.0"?><configuration>  <connectionStrings>    <add name="JabsBaseConnectionString" connectionString="Data Source=TAHASAGHIR-PC\sqlEXPRESS;Initial Catalog=JabsBase;Integrated Security=True" provIDername="System.Data.sqlClIEnt"/>  </connectionStrings>  <system.web>    <compilation deBUG="true" targetFramework="4.0">      <assemblIEs>        <add assembly="System.Data.linq,Version=4.0.0.0,Culture=neutral,PublicKeyToken=B77A5C561934E089"/>      </assemblIEs>    </compilation>    <httpRuntime maxRequestLength="2097151" useFullyQualifIEdRedirectUrl="true"/>  </system.web>  <system.serviceModel>        <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" />    <bindings>      <basichttpBinding>        <binding name="SendLargeChat"                 allowcookies="false"                 bypassproxyOnLocal="false"                  maxBufferPoolSize="2147483647"                 maxReceivedMessageSize="2147483647"                 maxBufferSize="2147483647"                 closeTimeout="10:00:00"                 openTimeout="10:00:00"                 receiveTimeout="10:00:00"                 sendTimeout="10:00:00"                 transferMode="Streamed">          <readerQuotas             maxArrayLength="2147483647"            maxBytesPerRead="2147483647"            maxDepth="2147483647"            maxnametableCharCount="2147483647"            maxStringContentLength="2147483647" />        </binding>      </basichttpBinding>          </bindings>    <services>      <service name="Prototype.SendChatService" behaviorConfiguration="Prototype.SendChatServiceBehavior">        <endpoint address="" binding="basichttpBinding" bindingConfiguration="SendLargeChat" contract="Prototype.SendChatService" />        <endpoint address="mex" binding="mexhttpBinding" contract="IMetadataExchange" />      </service>          </services>        <behaviors>      <serviceBehaviors>        <behavior name="">          <serviceMetadata httpGetEnabled="true" />          <serviceDeBUG includeExceptionDetailinFaults="true" />        </behavior>        <behavior name="Prototype.SendChatServiceBehavior">          <serviceMetadata httpGetEnabled="true"/>          <serviceDeBUG includeExceptionDetailinFaults="true"/>          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>        </behavior>      </serviceBehaviors>    </behaviors>  </system.serviceModel>  <system.webServer>    <modules runAllManagedModulesForAllRequests="true"/>  </system.webServer></configuration>

ServiceReferences.ClIEntConfig

<configuration>  <system.serviceModel>    <bindings>      <basichttpBinding>                <binding name="BasichttpBinding_ISendChatService" maxBufferSize="2147483647"          maxReceivedMessageSize="2147483647">          <security mode="None" />        </binding>      </basichttpBinding>          </bindings>    <clIEnt>            <endpoint address="http://localhost:53756/PrototypeSite/SendChatService.svc"        binding="basichttpBinding" bindingConfiguration="BasichttpBinding_ISendChatService"        contract="SendChatService.ISendChatService" name="BasichttpBinding_ISendChatService" />    </clIEnt>  </system.serviceModel></configuration>

请求
POST http://localhost:53756/PrototypeSite/SendChatService.svc http / 1.1
主持人:localhost:53756
连接:保持活力
参考文献:http://localhost:53756/PrototypeSite/ClientBin/Prototype.xap
内容长度:1348176
soapaction:“http://tempuri.org/ISendChatService/addMsg”
content-type:text / xml;字符集= utf-8的
接受:/
用户代理:Mozilla / 5.0(windows NT 6.1)AppleWebKit / 534.24(KHTML,与Gecko一样)Chrome / 11.0.696.68 Safari / 534.24
Accept-EnCoding:gzip,deflate,sdch
Accept-Language:en-US,en; q = 0.8
Accept-Charset:ISO-8859-1,utf-8; q = 0.7,*; q = 0.3

响应
http / 1.1 400错误请求
服务器:ASP.NET Development Server / 10.0.0.0
日期:2011年5月26日星期四17:48:00 GMT
X-AspNet-Version:4.0.30319
缓存控制:私有
内容长度:0
连接:关闭

解决方法 404 / Not Found是Silverlight针对所有服务器错误报告的错误.如果您想知道从服务器返回的实际错误,您可以使用类似于 Fiddler的内容来查看正在发送和接收的内容,包括包含服务器返回的实际错误代码和错误消息的标头. 总结

以上是内存溢出为你收集整理的silverlight – 发送大字节数组出错全部内容,希望文章能够帮你解决silverlight – 发送大字节数组时出错所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1005459.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存