小编Jak*_*ary的帖子

InvalidOperationException on File return

am running into some weird issue when i try to return a file to be downloaded, so this is my code

string filePath = Path.Combine(Path1, Path2, filename);
return File(filePath, "audio/mp3", "myfile.mp3");
Run Code Online (Sandbox Code Playgroud)

but the problem it return this error

InvalidOperationException: No file provider has been configured to process the supplied file.

am not sure what i have missed, any help ?

c# asp.net asp.net-mvc .net-core asp.net-core

11
推荐指数
2
解决办法
6530
查看次数

标签 统计

.net-core ×1

asp.net ×1

asp.net-core ×1

asp.net-mvc ×1

c# ×1