We help IT Professionals succeed at work.

msg file doesn't open in Firefox

Hi,

I have a web page from which I open files stored in SQL. To open them I use a IHttpHandler with this code:

                context.Response.ContentType = "application/vnd.ms-outlook";
                context.Response.AddHeader("content-disposition", "attachment;filename=" + docName);

This works fine to open msg files in Internet Explorer but when I use Firefox I get the following message:

The command line argument is not valid. Verify the switch you are using.

Any idea how to fix this?

Best regards
RTsol
Comment
Watch Question

Commented:
What OS are you using? If it's XP then you can try this knowledge base article.

http://support.microsoft.com/kb/312346

Author

Commented:
It is not XP - it is Windows 7
Use a TableAdaptor to pull data from a SQL Database.  A TableAdaptor will store everything you need to fool around with SQL DB's (e.g. SQL Queries, Connection Strings, ect.)  It is a very hard topic to grasp though but, once you get it... http://msdn.microsoft.com/en-us/library/bz9tthwx(v=vs.80).aspx.

Ryan F
Dude, if it is just a path, rework something!
CERTIFIED EXPERT

Commented:
Check for the settings in the firefox.. like the pop up is disabled..

Regards
Rajeesh

Author

Commented:
Pop ups are allowed. It is only for msg files I have the problem. Other documents like .doc, .xls or .pdf open from Firefox with no problems.
Aaron JabamaniTechnical Architect

Commented:
Did you tried below

context.Response.AddHeader("content-disposition", "inline;filename=" + docName);

Author

Commented:
Hi,

It made no difference. It still opens fine in Internet Explorer but with Firefox it needs to be downloaded first - otherwise:

The command line argument is not valid. Verify the switch you are using.

Bets regards
RTSol
Commented:
Didn't find a solutioin for this - doing it in another way

Author

Commented:
Went for another solution