【发布时间】:2019-05-06 22:56:56
【问题描述】:
当我尝试返回要下载的文件时遇到了一些奇怪的问题, 所以这是我的代码
string filePath = Path.Combine(Path1, Path2, filename);
return File(filePath, "audio/mp3", "myfile.mp3");
但它返回此错误的问题
InvalidOperationException:没有配置文件提供程序来处理提供的文件。
我不确定我错过了什么,有什么帮助吗?
【问题讨论】:
-
这是你下载方法的完整代码吗?
标签: c# asp.net asp.net-mvc asp.net-core .net-core