单声道2.4,AutoHosting和MVC单声道、MVC、AutoHosting

2023-09-03 04:11:41 作者:乱了年轻的心

可以是mod_mono的AutoHosting进行修改,以支持ASP.NET? ATM它并没有真正的工作:链接。 /工作,但运行时会忽略的Global.asax完全和不遵循路由约定。

Can mod_mono's AutoHosting be modified to support ASP.NET? ATM it doesn't really work: Link. / works, but the runtime ignores Global.asax altogether and doesn't follow the routing conventions.

推荐答案

AutoHosting的单声道的目的是使尽可能地方便有人迅速获得托管在单一个ASP.NET站点通过减少工作量需要配置的服务器;但是,它是通过托管已配置为ASP.NET文件类型的文件类型。你可以找到它被配置在mod_mono.conf文件来承载的文件扩展名。

The purpose of AutoHosting in Mono is to make it as easy as possible for someone to quickly get an ASP.NET site hosted on Mono by reducing the amount of effort needed to configure the server; however, it does so by hosting file types which have been configured as ASP.NET file types. You can find the file extensions it is configured to host in the mod_mono.conf file.

由于MVC的路由避免使用文件扩展名,那可能只是不适合MVC托管一个很好的解决方案。也就是说,如果你绝对必须使用AutoHosting,您可以添加以下到您的mod_mono.conf文件设置的所有内容服务器送达为x-ASP-净含量: ForceType指令应用程序/ x-ASP网

Since MVC Routing avoids using file extensions, it is probably just not a good solution for MVC hosting. That said, if you absolutely must use AutoHosting, you could add the following to your mod_mono.conf file to set all content for the server to be served as x-asp-net content: ForceType application/x-asp-net

这样做有更广泛的影响,所以我不能说我会推荐它。

Doing so has broader implications, so I can't say I'd recommend it.

如果您需要更改配置Apache服务器的能力,你可能会得到更好的效果从刚才配置是mod_mono您的应用程序。

If you have the ability to change the configuration for the Apache server, you would probably get better results from just configuring mod_mono for your application.

 
精彩推荐
图片推荐