开发者

Url smaller than 2 tokens Error

I'm getting this awkward and embarrassing and somewhat heinous (sp?) and egregious error within MonoRail intermittently. When users go to the homepage of the site they get the error:

Url smaller than 2 tokens

Usually after 5-15 minutes the error will stop but it comes back regularly. It only happens on the homepage because it is the domainname.com and it doesn't throw this exception if the url has a subdirectory. It's the silliest Monorail error ever, as why would you want to throw an error if someone is on the homepage of your site?

Anyway, here is the route rule that supposedly should take care of this issue but does not:

 RoutingModuleEx.Engine.Add(
                new PatternRoute("Home开发者_运维知识库", "/[controller]")
                    .DefaultForArea().IsEmpty
                    .DefaultForController().Is("Home")
                    .DefaultForAction().Is("Index")
                );

Any ideas? I'm hoping the Monorail gurus can help me out.


I use a Default.aspx file for IIS to catch, and then in web.config or global.asax, urlrewrite it to my home page action. This always works for me.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜