I am having a problem with MIME type in DNN 4.3.5. The same type of files that could be opened by the correct application inside Internet Explorer when using DNN 3.2.2 can’t be opened by the same application (by default) inside Internet Explorer when using DNN4.3.5. We use DNN 3.2.2 for our organization’s intranet, and our intranet contains many links for user to download and view XFDL files (the Document Module is used to host those files). Here is a description of XFDL file in case anyone needs it: http://www.w3.org/TR/NOTE-XFDL. The content of the file has same format as XML file. The software “PureEdge Viewer” is used to open and view the XFDL files. In DNN 3.2.2, IE was able to auto-detect XFDL file type and launch PureEdge Viewer inside the browser. But, after I upgraded DNN 3.2.2 to DNN 4.3.5, IE doesn’t detect XFDL file anymore and can’t launch PureEdge Viewer by default anymore. Now the file seems to be treated like a XML file by IE and is instead displayed as a regular XML document inside the browser. I have the following observation: The file link under DNN 3.2.2 is: “~/LinkClick.aspx?link=file.xfdl&tabid=(number)&mid=(number)”, but in DNN 4.3.5, the file link became:
“~/LinkClick.aspx?fileticket=uwIuSkpYVTA%3d&tabid=(number)&mid=(number)”. The obvious differences between the two links are: DNN 3.2.2 uses “link” as the key of query string even for file links, but DNN 4.3.5 uses “fileticket” as the key for file links, and the value of the file name has been encrypted under DNN 4.3.5.
By using some HTTP sniffing software I found the HTTP headers sent by DNN 3.2.2 and DNN 4.3.5 are different. When DNN 3.2.2 sends the file to the browser, the MIME type of the file is “application/vnd.xfdl”, but when DNN 4.3.5 sends the file, the MIME type of the file is “application/octet-stream”. I don’t know what caused the difference. Could the underlying .NET 2.0 be doing this? But, because the MIME content-type is “application/octet-stream”, which means it is an ambiguous MIME type and IE can not determine the file extension because the file name with its extension are both encrypted, thus, I think the browser has to parse the beginning of the content of the file to determine what type of the file it is. Once IE sees the content of the file conforms to an XML file, it decides to treat the file as an XML file.
Can anyone give me some help on this issue? Thanks. I just need a way to host the XFDL file under DNN 4.3.5 so when the user clicks on the file link, the correct application can be launched inside IE to display the content of the files. Maybe a way to decrypt the file name will do the trick? Can DNN 4.3.5 send the correct MIME type to the browser like in DNN3.2.2?
Note: another observation I have is all other file types like .doc and .xls are now sent with the “application/octet-stream” MIME content-type under DNN 4.3.5 as well (in DNN3.2.2 they were sent with the correct MIME type like “application/msword” and “application/vnd.ms-excel”), but because IE recognizes the formats of those types of files after parsing the content of those files, they can still be launched with the correct applications (word and excel) inside the browser.