上传和播放大视频。 HttpRuntime 标签设置组合。 ASP.net4.0、C#
网页上传大文件和通用处理程序播放这些大型 wmv 视频文件,大小可达 150 MB。我将文件内容存储在 SQL Server 2005 中的 varbinary 类型中。 我在 web.config 的 httpRuntime 中设置了以下设置
<httpRuntime executionTimeout="110"
maxRequestLength="2097151"
requestLengthDiskThreshold="2097150"
shutdownTimeout="600"
delayNotificationTimeout="400"/>
问题是有时我的文件无法播放。它已正确上传,但播放请求时似乎超时。我能够播放最大 100 MB 的文件。它在本地和生产环境中十分之九都可以工作,但为什么有时会失败。同一文件在一个实例中播放,但在另一实例中则不播放。任何人都可以建议问题可能出在哪里。我认为一定有一些我缺少的 httpRuntime 属性的组合。请建议。这是一个不断出现的生产问题。
net page to upload a large file and a generic handler to play these large wmv video files of size which can be upto 150 MB's. I have the file content stored in varbinary type in SQL Server 2005.
I have set following settings in httpRuntime in web.config
<httpRuntime executionTimeout="110"
maxRequestLength="2097151"
requestLengthDiskThreshold="2097150"
shutdownTimeout="600"
delayNotificationTimeout="400"/>
The problem is that sometimes my files doesnt play. It get uploaded properly but when playing the request seems to get timeout. I was able to play files upto 100 MB's. It works 9 out of 10 times on local and production but why does it fails sometimes. The same file get played in one instance but on other instance it doesnt. Can anybody suggest where the problem may be. I think there must be some combination of httpRuntime attributes which i am missing. Please suggest. Its a production issue which keeps popping up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不使用 IHttpHandler?试试这个 使用 IHttpHandler 上传文件 可能会有如果您愿意搜索,可以使用 IHttpHandler 更好的解决方案。
why don't you use IHttpHandler? try this Uploading FIle Using IHttpHandler Might be there will be better solutions to use IHttpHandler if you will search for it.