Fammy
Fammy

Reputation: 563

What are the mime types of the various file types native to .NET?

I'm using Visual Studio 2010 to open files from a server, by going to File\Open\File (Control-O) and typing in a URL. The server is serving the document from an URL without an extension (http://hostname/path/document).

If I set the mime type to text/xml, Visual Studio properly opens the document as an XML document when using text/xml, and a JavaScript document when using text/javascript. What are the mime types for .vb, .cs and other native file types in .NET? I've tried text/plain, text/csharp, and others, but all attempts opens as plain text.

Upvotes: 1

Views: 447

Answers (1)

Assaf Lavie
Assaf Lavie

Reputation: 75913

Can you serve it with Content-Disposition: attachment and make sure the file name has the right extension? (the URL can stay the same...)

Upvotes: 2

Related Questions