- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 Silverlight 应用程序,它在我的 asp.net 应用程序中使用 WCF 服务。silverlight 应用程序以墨迹笔划的形式保存“绘图”。这些笔画采用 xaml(可能有点大)的形式,我将其转换为字符串并发送到服务以将字符串保存到 sql server。 (基本上做与这个应用程序相同类型的事情 http://msdn.microsoft.com/en-us/magazine/cc721604.aspx )。
这是有效的,我可以看到我的服务方法在绘图相对较小时被命中,但是如果绘图变大,我会得到这个大错误并且服务方法断点永远不会被命中。似乎我正在通过大小阈值,但我不知道我是否正确或更改什么来解决问题。
我已经搜索了 google 和 SO 没有成功,所以任何帮助将不胜感激。提前致谢。
我的服务:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DrawingService: IDrawingService
{
#region IDrawingService Members
public bool SaveEvalAreaDrawing(int EvalAreaId, string xmlToSave)
{
return true;
}
public bool SaveEvalItemDrawing(int EvalItemId, string xmlToSave)
{
return true;
}
public string GetEvalAreaDrawing(int EvalAreaId, string xmlToSave)
{
return "you got the eval drawing!";
}
public string GetEvalItemDrawing(int EvalItemId, string xmlToSave)
{
return "you got the eval item drawing!";
}
#endregion
}
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MyNameSpace.Services.DrawingServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="customBinding0">
<binaryMessageEncoding />
<httpTransport>
<extendedProtectionPolicy policyEnforcement="Never" />
</httpTransport>
</binding>
</customBinding>
<wsHttpBinding>
<binding name="wsPlainBinding" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None">
<transport clientCredentialType="None">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="None" negotiateServiceCredential="false"
establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="HSD.ECERS.Services.DrawingServiceBehavior"
name="HSD.ECERS.Services.DrawingService">
<endpoint address="Services" binding="wsHttpBinding" bindingConfiguration="wsPlainBinding"
name="wsPlainHttp" contract="HSD.ECERS.Services.IDrawingService" />
<endpoint address="mex" binding="mexHttpBinding" name="wsdl"
contract="IMetadataExchange" />
</service>
</services>
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="wsPlainHttp">
<textMessageEncoding messageVersion="Default" writeEncoding="utf-8" />
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<extendedProtectionPolicy policyEnforcement="Never" />
</httpTransport>
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:41594/Services/DrawingService.svc/Services"
binding="customBinding" bindingConfiguration="wsPlainHttp"
contract="EvalDrawingService.IDrawingService" name="wsPlainHttp" />
</client>
</system.serviceModel>
</configuration>
public bool EndSaveEvalAreaDrawing(System.IAsyncResult result) {
object[] _args = new object[0];
bool _result = ((bool)(base.EndInvoke("SaveEvalAreaDrawing", _args, result))); // Here is where is popping up
return _result;
}
{System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at EvaluaionAncillaryControl.EvalDrawingService.DrawingServiceClient.DrawingServiceClientChannel.EndSaveEvalAreaDrawing(IAsyncResult result)
at EvaluaionAncillaryControl.EvalDrawingService.DrawingServiceClient.EvaluaionAncillaryControl.EvalDrawingService.IDrawingService.EndSaveEvalAreaDrawing(IAsyncResult result)
at EvaluaionAncillaryControl.EvalDrawingService.DrawingServiceClient.OnEndSaveEvalAreaDrawing(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}
最佳答案
尝试增加 readerQuotas -- 在 binding
中添加此元素元素
<readerQuotas maxStringContentLength="2147483647" />
关于silverlight - 远程服务器返回错误 : NotFound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5185571/
在 Windows Phone 上,我可以使用 StatusCode == HttpStatusCode.NotFound 获取 WebException if 服务器返回 404 由于连接不良,无法
我有一个 Silverlight 应用程序,它在我的 asp.net 应用程序中使用 WCF 服务。silverlight 应用程序以墨迹笔划的形式保存“绘图”。这些笔画采用 xaml(可能有点大)的
使用 CMake 时返回 VTK_DIR-NOTFOUND。我正在使用 CMake GUI,并且作为其他路径错误,我可以指向正确的路径。但是,对于 VTK 不起作用。我指向 VTConfig.cmak
我实际上训练了自定义视觉模型来检测车辆,并且我想实时检测它们,所以我尝试运行 github https://github.com/microsoft/Cognitive-Samples-VideoFr
使用 WCF 服务(由 Silverlight 使用)时,我们经常遇到错误,这些错误没有给我们提供太多的工作: The service '/ourservice.svc' cannot be acti
我的项目目标是 Windows Phone 7.5 及更高版本。 我使用一种方法来获取在线图像并检查图像的类型,如果是 gif 则将其转换为 jpg 并将其绑定(bind)到图像控件,如果是 jpg
我正在使用 httprouter对于 API,我正在尝试弄清楚如何处理 404。它确实在 docs 中说404 可以手动处理,但我真的不知道如何编写自己的自定义处理程序。 我在其他路线之后尝试了以下.
我在尝试使用 CMake 配置项目时遇到了一些问题。 尽管 CMake 似乎找到了所需的库: Boost version: 1.49.0 Found the following Boost libra
我有一个返回 HttpClientErrorException.NotFound 的第三方服务。当它返回此异常时,我从应用程序中抛出异常,表示输入无效,但对于所有其他异常(例如服务不可用等),我需要使
我对 Oracle PLSQL 完全陌生。任何帮助表示赞赏。 我找不到类似的问题(也许它太基础了?) 我正在运行来自 TOAD、Oracle 11G 的代码 SET SERVEROUTPUT ON D
基于各种示例(例如 here ),我非常确定我的设置正确: 1) 我在网站的根目录中创建了一个文件“notfound.html” 2) 我正在运行 xampp,即。 Apache Web 服务器,因此
我的客户为我使用 PHP 构建的应用程序编写了后端。然而他的数据库写得不太好。例如,有两张表,一张是“users”,一张是“user_settings”。然而,一旦用户决定修改其设置,他的脚本只会在“
我使用 Docker hub 上提供的 Powershell 脚本通过 Docker 安装了 RavenDb:https://hub.docker.com/r/ravendb/ravendb/ (运行
我想实现一个目标。我正在通过演示代码分享我的概念。 interface NotFound{ //define one marker interface which will mark
当我在调度程序线程上执行以下代码时,每次我开始使用新的模拟器进行调试时,我的 Windows Phone 应用程序都会抛出 WebException 异常: public MainPage() {
我编写了一个非常简单的 WCF 服务,运行良好(下面的代码),然后我添加了一堆其他方法(它们完全相同,除了引用不同的表)。但是由于某种原因,我收到错误消息“远程服务器返回错误:NotFound”。当我
我正在为我的网站开发 Web API,但遇到了问题。 目前,API 应该返回指定用户的详细信息。 这是我的帐户 Controller : using System; using System.Coll
当在我的 WebApi GET 操作中找不到某些内容时,我将返回一个 NotFound IHttpActionResult。除了此响应,我还想发送自定义消息和/或异常消息(如果有)。当前 ApiCon
我正在使用 https://github.com/julienschmidt/httprouter在我的 Go 项目中。 我刚才问了这个问题,@icza 解决了这个问题:httprouter conf
我正在开发 DOT 5.0 版本。 (核心 MVC 应用程序)。 在 Azure 中上传文件时(编码期间)遇到错误。 Asset outputAsset = await CreateOutputAss
我是一名优秀的程序员,十分优秀!