sachintha81
asked on
How to register MIME types and file extensions to IIS?
We have a web service, for which to work a particular file extension (.jdf) needs to be registered under MIME types for that service in IIS. Usually what we do is after installing the service (by executing setup file) we go to the particular entry which is listed under "Default Web Site" in IIS (We use Windows Vista + IIS 7) and under MIME settings manually add a MIME type.
That is we specify it as follows:
File Extension : .jdf
MIME type : text/xml
Now I'm assigned the task of automating this process. Which means this needs to be done automatically during the installation of the service. The installer is built using C# and Wix, so how can I register this using a C# code?
Please note that I'm just a beginner so any step-by-step instructions and (using C#) code sample would be of great help.
Thanks in advance.
P.S.
I found this one but it is not working on Vista.
http://msdn.microsoft.com/en-us/library/ms525901.aspx
That is we specify it as follows:
File Extension : .jdf
MIME type : text/xml
Now I'm assigned the task of automating this process. Which means this needs to be done automatically during the installation of the service. The installer is built using C# and Wix, so how can I register this using a C# code?
Please note that I'm just a beginner so any step-by-step instructions and (using C#) code sample would be of great help.
Thanks in advance.
P.S.
I found this one but it is not working on Vista.
http://msdn.microsoft.com/en-us/library/ms525901.aspx
Also check this:
http://support.microsoft.com/kb/326965
http://support.microsoft.com/kb/326965
ASKER
I actually need a C# code which does this process. As I've stated in the original question we already do this process manually and need to automate it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Refer this article:
http://www.hosting.com/support/dedicated/IIS/newmime/
Hope this helps,
Shree