gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 03:07:39 29 4
gpt4 key购买 nike

我有 WCF 服务,通过它我在数据库中添加数据。它工作正常,但是当我尝试发送大字节 [] 时,它返回“远程服务器返回错误:NotFound”。

网络配置

    <?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>

请求
发布 http://localhost:53756/PrototypeSite/SendChatService.svc HTTP/1.1
主机:本地主机:53756
连接:保持事件
推荐人: http://localhost:53756/PrototypeSite/ClientBin/Prototype.xap
内容长度:1348176
肥皂 Action :“http://tempuri.org/ISendChatService/addMsg”
内容类型:文本/xml;字符集=utf-8
接受:/
用户代理:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
接受编码:gzip、deflate、sdch
接受语言:en-US,en;q=0.8
接受字符集:ISO-8859-1,utf-8;q=0.7,*;q=0.3

回复
HTTP/1.1 400 错误请求
服务器:ASP.NET 开发服务器/10.0.0.0
日期:格林威治标准时间 2011 年 5 月 26 日星期四 17:48:00
X-AspNet-版本:4.0.30319
缓存控制:私有(private)
内容长度:0
连接:关闭

最佳答案

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

关于silverlight - 发送大字节数组时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6137800/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com