.NET项目源代码文件的MIME类型是什么?

时间:2023-01-19 00:02:27

Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files in a .NET project?

.NET项目中的.cs(C#source),。arex,.aspx等文件是否有官方MIME类型?

If no official types are defined, any recommendations on good MIME types? This will be exposed via Apache and the mod_dav_svn module when viewing a Subversion repository from a web browser, so anything that'll help Firefox et al render the file correctly would do the trick.

如果没有定义官方类型,那么关于良好MIME类型的任何建议?当从Web浏览器查看Subversion存储库时,这将通过Apache和mod_dav_svn模块公开,因此任何有助于Firefox等正确呈现文件的方法都可以解决问题。

2 个解决方案

#1


9  

Use the information on this answer to easily determine the MIME types.

使用此答案的信息可以轻松确定MIME类型。

For example (running on Windows XP SP2) I got the following results:

例如(在Windows XP SP2上运行),我得到以下结果:

  • cs - text/plain
  • cs - text / plain

  • resx - text/xml
  • resx - text / xml

#2


2  

Apparently Gnome uses text/x-csharp for C# source files, but I'd personally expect .cs and .aspx files to be text/plain and .resx to be text/xml.

显然Gnome使用text / x-csharp作为C#源文件,但我个人希望.cs和.aspx文件是text / plain,而.resx是text / xml。

#1


9  

Use the information on this answer to easily determine the MIME types.

使用此答案的信息可以轻松确定MIME类型。

For example (running on Windows XP SP2) I got the following results:

例如(在Windows XP SP2上运行),我得到以下结果:

  • cs - text/plain
  • cs - text / plain

  • resx - text/xml
  • resx - text / xml

#2


2  

Apparently Gnome uses text/x-csharp for C# source files, but I'd personally expect .cs and .aspx files to be text/plain and .resx to be text/xml.

显然Gnome使用text / x-csharp作为C#源文件,但我个人希望.cs和.aspx文件是text / plain,而.resx是text / xml。