如何在 webconfig 中设置绑定以在 RESTful WCF 服务中启用流式传输
我有一个 RESTful 服务,我正在尝试启用该服务来接受 PDF 文件。我使用流来传输它,但在这个过程中我不断遇到神秘的错误。
我的第一个错误是这样的:安全协商失败,因为远程方没有及时发回回复。这可能是因为底层传输连接被中止。
不确定是什么原因造成的。另外,我尝试添加 customBinding 来尝试修复此错误,但收到一条错误消息,指出我的绑定设置不正确。
我的主要总体问题是: 有谁知道如何设置它以启用流媒体的简单绑定和完整说明?
I have a RESTful service which I'm trying to enable to accept a PDF file. I'm using a stream to transport it, but I keep running into mysterious errors in the process.
My first error is this: Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted.
Not sure what's causing that. Also, I tried adding a customBinding in an attempt to fix this error, and I get an error that says I don't have my binding set up properly.
My main, overall question is this:
Does anyone know of a simple binding and complete instructions for how to set it up to enable streaming?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法让它工作。我发现我的问题不是我的绑定,而是它从未注册。这是 web.config 文件中的代码:
I managed to get it working. I found that my problem wasn't my binding, but that it was never registered. Here's the code in the web.config file: