0

I do have an audio angular app with Microsoft dotnet core 6 backend and many audio files accesses via virtual directory. I can access any files except files with .flac extension (I have added .flac and audio/flac to mime type file in IIS). The error code is 404. However, if I change the file extension from .flac to .fla then it works and I can play it as Flac file. How can I tell the iis to accept/ access the .flac file? I am running windows 10 64bit with IIS.

Thanks.

D052057
  • 53
  • 6
  • 2
    To learn what happens to .flac, enable FRT and reproduce the 404 error. Then the log file(s) can tell why. – Lex Li Sep 03 '22 at 23:47
  • Have you tried to test another mime type : `audio/x-flac`, or check if it work with `application/octet-stream`. As far as I know, there is no such type file as `.fla`, or it may be a type recognized by other 3rd party software. And as already mentioned, using FRT to view log files would be good advice. – Xudong Peng Sep 05 '22 at 08:23
  • the audio/x-flac mime type doesn't work. The only way I can make it to work is to change the file ext. to .fla (if you look at the mime type in IIS, yes you will see ".fla". When I try to access the .flac file, the IIS give me 404 error. I change it to '.fla' then it recognize it and the error 404 is gone away. I did google the issue. It seems that people have had the same issue by using different format instead. However, I don't think it is the right solution. It should be 'real solution' for this since browsers now play 'flac' file. Thanks. – D052057 Sep 06 '22 at 09:18
  • Well, if this is the case, I think you have to find the reason of this issue via FRT as mentioned above, this should be better help solve this problem. – Xudong Peng Sep 09 '22 at 08:01
  • I decide to create a tiny test app in this case. I put it in my repos, https://github.com/d052057/FlacTest. You're welcome and download and run this tiny app. It is require VS2022 and a few instructions to follow. Thanks. – D052057 Sep 11 '22 at 04:44

1 Answers1

0

I had to add the MIME type in the root of IIS - not in the individual site settings.

I've set .flac to audio/flac and Chrome streams it fine.

Good luck!

Nosyarg
  • 1
  • 2