Can I setup a custom MIME type through ASP.NET or some .NET code? I need to register the Silverlight XAML and XAP MIME types in IIS 6.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- How to store image outside of the website's ro
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
To add to the master mime type list:
Add a reference to :
'System.DirectoryServices' on the .NET add references tab
'Active DS IIS Namespace Provider' on the COM add references tab.
To configure a mime type for a specific site, change ..
'IIS://Localhost/MimeMap'
to
'IIS://Localhost/W3SVC/[iisnumber]/root'
...replacing
'[iisnumber]'
with the IISNumber of the website.'Active DS IIS Namespace Provider' on the COM add references tab.
If it's not there, you have to install IIS on your machine.
See Is there a way to get ALL the MIME types instead of wrinting a huge case statement?