开发者

How to map a custom file extension to mono?

开发者 https://www.devze.com 2023-01-21 13:48 出处:网络
I have mapped *.xyz extension to my own custom handler in asp.net and can run it on Windows asp.net.

I have mapped *.xyz extension to my own custom handler in asp.net and can run it on Windows asp.net.

How can I do the same thing on mono (Linux/Apache - ubuntu)?

I have this in my web.config:

<httpHandlers><add path="*.xyz" verb="*" type="MyCustomHandler,...">...

I also adde开发者_开发问答d similar things to mod_mono.conf and several other files but still I get

http 404 The resource cannot be found.


If you have AutoConfiguration enabled then you need to add:

AddType application/x-asp-net .m

to mod_mono.conf, where .m is your custom extension.

If you have AutoConfiguartion disabled the you need to add:

AddHandler mono .m

to your httpd.conf.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号