指定的网络名称不再可用 [英] The specified network name is no longer available

查看:424
本文介绍了指定的网络名称不再可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想从nancy嵌入式http服务器播放本地视频文件。可以读取一个txt文件但是一旦它尝试打开一个视频文件就会在

Hi,

I want to play local video file from nancy embedded http server. It is ok to read a txt file but once it tries to open a video file it gives "The specified network name is no longer available" error on the line

return Response.AsStream(() => File.OpenRead(@"E:\test_videos\test.mp4"), "video/mp4");



我可以从浏览器播放视频,那么什么是那么错了吗?



更新:我可以在firefox和IE上播放视频,错误只发生在chrome。


I can play the video from browser so what is wrong then?

Update: I could play video on firefox and IE, the error occur only in chrome.

推荐答案

这段代码不足以猜测它为什么会发生,特别是当你声明它只发生在Chrome中时...



我建议阅读这些:

错误消息:指定的网络名称为no更长的时间。 [ ^ ] - 这里你会找到一些关于原因的描述,

http: //stackoverflow.com/questions/8741474/returning-a-stream-from-file-openread [ ^ ]
This piece of code is not enough to guess why it happens, especially when you state that it happens only in Chrome...

I'd suggest to read these:
Error Message: The specified network name is no longer available. [^] - here you'll find some description about the reasons,
http://stackoverflow.com/questions/8741474/returning-a-stream-from-file-openread[^]


我已经为nancyfx实现了mp4handler并且它有效。
I have implemented mp4handler for nancyfx and it worked.


这篇关于指定的网络名称不再可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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