开发者

Mapping Castle MonoRail default requests to a controller action

I'm running a MonoRail application that has no routing configured. So I'm using MRs standard Area/Controller/Action.aspx scheme. (I changed the MonoRail handler to listen for .aspx requests).

Now, the problem he开发者_JAVA技巧re is that /Home/Index.aspx is my start-page, yet if someone comes to http://server.com/ it's not transferred to /Home/Index.aspx but is seeing a directory listing forbidden page instead.

Are there any quick fixes for this? I tried making a HttpHandler listen on /default.aspx that issues a Server.Transfer to my /Home/Index.aspx. Yet that fails with the defaultUrlTokenizer since it can't extract the proper controllername / actionname to invoke afterwards.


You can get helped from the Routing module, and set it up only on the "/" url if you don't need anything else.

e.g.:

http://www.kenegozi.com/blog/2009/02/10/monorail-routing-and-the-homepage-routing-rule.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜