First, Introduction
1, the system defaults to provide us with some of the file types of processing methods.
2, the system does not provide us with the processing of file types can not be used, for example: apk
3, you need to add mime, in order to access
4. The following is an example of adding APK access
Second, do not add mime when
1. Put an apk file in the static directory
2, enable Usestaticfiles (see the basic article to enable static files)
3, access to this file via HTTP, the results can not access
App. Usestaticfiles ();
Third, after adding mime
1, add the MIME code in startup, note that Usestaticfiles replaces the original, instead of adding one.
2, re-visit, normal download
// Add MIME var New Fileextensioncontenttypeprovider (); Provider. mappings[". apk""application/vnd.android.package-archive "; App. Usestaticfiles (new staticfileoptions { = provider });
Netcore occasionally useful article: Netcore Item add MIME