Hello,
In my windows service built with C# I am trying to set the mime types based on the file extensions as shown below
static string GetMimeType(string fileName)
{
string mimeType = "application/unknown";
string ext = Path.GetExtension(fileName).ToLower();
Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(ext);
if (regKey != null && regKey.GetValue("Content Type") != null)
mimeType = regKey.GetValue("Content Type").ToString();
return mimeType;
}
On the production server we don't have Acrobat or word installed for obvious reasons. How do I get around with this? Is there any other way of setting the mime types? If not how do I create those mime types on the production server without having to install those softwares.
Thanks in advance