数据服务流媒体提供商 [英] Data Services Streaming provider

查看:103
本文介绍了数据服务流媒体提供商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了一个流媒体提供程序,允许将大文件流式传输到SQL Server 2008中的FILESTREAM列。

I have implemented a streaming provider to allow streaming of large files into a FILESTREAM column in SQL Server 2008.

我已经将web.config中的maxMessageReceived大小修改为大于我们尝试流式传输的任何二进制大小的最大大小。

I hvae modified the maxMessageReceived size in the web.config to be larger than the max size of any binary size we are trying to stream.

在WPF客户端应用程序中,我调用SetSaveStream并将流设置为来自客户端的文件流,然后调用SaveChanges。

On the WPF client application, I call the SetSaveStream and set the stream to a filestream from the client and then call SaveChanges.

对于小文件,这一切都很有效。 但是,对于大文件(如视频300MB),我会收到"Out of Memory"。调用SaveChanges()方法后,客户端上的一段时间异常。 服务器IIS进程内存
的内存也会上升。 我的印象是数据服务会使用"chunked"。 MR请求的传输编码。 

For small files this all works great.  However, for large files (like a video 300MB), I receive a "Out of Memory" Exception after a while on the client when the SaveChanges() method is called.  Also the memory on the server IIS process goes way up.  I was under the impression that Data Services would use a "chunked" transfer encoding for MR Requests. 

如果客户端和服务器都将enitre请求缓冲到内存中,这是否会破坏尝试实现流式传输的目的?

If both the client and the server buffer the enitre request into memory, doesn't this defeat the purpose of trying to implement streaming?

我可以成功上传一个较小的文件(90MB),但在使用Fiddler检查请求后,我发现请求大小为90MB,并且请求未设置为使用分块传输编码。 

I can upload a smaller file (90MB) successfully, but after inspecting the request using Fiddler I see that the request size is 90MB and that the request is not set to use a chunked transfer encoding. 

任何帮助都会很棒。

 

 

 

推荐答案

您好Paul,

Hi Paul,

这可能对您有所帮助:

http://blogs.msdn.com/b/astoriateam/archive/2010/08/04/data-services-streaming-provider-series-implementing-a-streaming-provider- part-1.aspx

http://blogs.msdn.com/b/astoriateam/archive/2010/ 09/08 / data-services-streaming-provider-series-part-2-visiting-a-media-resource-stream-from-the client.aspx

Which might be helpful to you:
http://blogs.msdn.com/b/astoriateam/archive/2010/08/04/data-services-streaming-provider-series-implementing-a-streaming-provider-part-1.aspx
http://blogs.msdn.com/b/astoriateam/archive/2010/09/08/data-services-streaming-provider-series-part-2-accessing-a-media-resource-stream-from-the-client.aspx

谢谢你
Pam

Thanks
Pam


这篇关于数据服务流媒体提供商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆