【发布时间】:2017-01-06 06:05:31
【问题描述】:
我有一个 MVC 5 Web 应用程序,其中我有一个 WCF 服务,其合同如下:
[ServiceContract(ConfigurationName="IDocumentGenerator")]
public interface IDocumentGenerator
{
[OperationContract(Action = "GenerateDocument"), XmlSerializerFormat]
Stream GenerateDocument(string DocId, string Format, string returnAs, string userName, string password, XmlDocument Payload);
}
我在 Web.Config 文件中使用以下配置:
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647" transferMode="Streamed">
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:64172/DocumentGenerator.svc" binding="webHttpBinding" contract="IDocumentGenerator" name="WebHttpBinding_IDocumentGenerator" />
</client>
</system.serviceModel>
接下来,我正在使用 Apache JMeter 将 Soap-XML/RPC Request 发送到 URL http://localhost:64172/DocumentGenerator.svc,所有小于 65KB 的请求都会命中 IIS Express 服务器,但是一旦请求变大,请求甚至不会访问服务器。
我已经尝试了 4-5 个小时的不同选项,但无法解决。
感谢任何帮助。
【问题讨论】:
-
你得到什么错误?
-
当我使用 JMeter 时,我不知道如何查看错误。生成的请求行只是错误地变为红色。
-
从我创建的另一个控制台客户端应用程序中,我收到一个错误:413 - 请求实体太大
标签: c# web-services wcf soap jmeter