samuelneff/MimeTypeMap

Mime type not recognize

JoseRodriguezLopez opened this issue · 7 comments

Hi, I am having problems with extension "application/vnd.ms-outlook". I reviewed class MimeTypeMap.cs and it is there but for some reason I am getting an exception "Requested mime type is not registered: application/vnd.ms-outlook".

Can you share a short snippet of code? Did you copy and paste the error exactly or did you retype it into GitHub?

private static string GetExtension(string contentType) { return MimeTypes.MimeTypeMap.GetExtension(contentType); }

I confirm you that I copied and pasted the error from VS. Thanks in advance!

Where exactly does contentType come from? User provided? Do you get this error if you try other valid mime types?

Can you set a breakpoint inside GetExtension and see what the difference/issue is when stepping through?

The content type come from a web client response headers, specifically from the Content-Type. It works with other mime types , I am getting the error just with "application/vnd.ms-outlook."

I've thought about this issue a lot and am sorry to say I can't reproduce the issue or come up with an explanation or fix.