Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Content type for msg files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 24 Sep 2007 18:23 GMT
Our application has an aspx page that sets the Response.ContentType based on
the file extension of the file selected, e.g. if .doc it sets it to
"Application/msword", if .gif it sets it to "image/gif", etc.  What would I
use for .msg files that come from Outlook?  Thanks.

David
Alexey Smirnov - 24 Sep 2007 18:54 GMT
> Our application has an aspx page that sets the Response.ContentType based on
> the file extension of the file selected, e.g. if .doc it sets it to
> "Application/msword", if .gif it sets it to "image/gif", etc.  What would I
> use for .msg files that come from Outlook?  Thanks.

David, I think it should be "application/octet-stream"
Alexey Smirnov - 24 Sep 2007 19:13 GMT
> > Our application has an aspx page that sets the Response.ContentType based on
> > the file extension of the file selected, e.g. if .doc it sets it to
> > "Application/msword", if .gif it sets it to "image/gif", etc.  What would I
> > use for .msg files that come from Outlook?  Thanks.
>
> David, I think it should be "application/octet-stream"

okay I think this one is better

Response.ContentType = "application/vnd.ms-outlook";

I'm not sure if it's version dependent or not, but for my Outlook 2002
it's working well

Don't forget to add

Response.AddHeader("Content-Disposition",
"inline;filename=newmessage.msg");

Or simply use

Response.AddHeader("Content-Disposition",
"attachment;filename=newmessage.msg");

This one should work without a content type
David C - 24 Sep 2007 20:13 GMT
Thank you.  That worked perfect.

David

>> > Our application has an aspx page that sets the Response.ContentType
>> > based on
[quoted text clipped - 23 lines]
>
> This one should work without a content type

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.