No Server.Transfer will throw the UrlTokenizer at you since it can't break
the Url down into /Controller/Action
I solved the whole thing by writing a custom IHttpHandler that accepts the
path "/Default.aspx" (since *.aspx is mapped to MR) and redirects to
/Home/index.aspx

Yet, I'm not totally happy with that since it uses a 302 redirect to the
homepage. I'd rather like to have the homepage be at /.

So I guess I'll retrofit the routing module like Ken suggested.

Thanks anyway.
greetings Daniel

On Thu, Oct 15, 2009 at 4:51 PM, Bill Barry <[email protected]> wrote:

>  Go ahead, Server.Transfer should work in place of Response.Redirect.
>
>
>
> Ken Egozi wrote:
>
> I, personally, don't like it at all. I like that the url (visible in the
> address bar) of the site's homepage is what it is.
> I also suspect that redirecting would yield SEO penalty
>
>  Rewriting (or routing) to the correct location is pretty simple in
> Monorail, and even in bad old WebForms (using Server.Transfer), so why not
> use it?
>
>
>
> On Thu, Oct 15, 2009 at 4:34 PM, Symon Rottem <[email protected]> wrote:
>
>> Pretty much exactly the way I do it too.
>>
>> Symon.
>>
>> Symon Rottem
>> http://blog.symbiotic-development.com
>>
>>
>>   On Thu, Oct 15, 2009 at 4:06 PM, Bill Barry <[email protected]>wrote:
>>
>>> I do this (actual code from my site, changed redirect string):
>>>
>>> Default.aspx
>>> --
>>> <%@ Page Language="vb" %>
>>>
>>> <!DOCTYPE html>
>>>
>>> <html>
>>> <head runat="server">
>>>     <title>Default</title>
>>> <script type="text/VB" runat="server">
>>>     Public Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs)
>>>         Response.Redirect("~/Home/Index.aspx")
>>>     End Sub
>>> </script>
>>> </head>
>>> <body>
>>> </body>
>>> </html>
>>> --
>>> (no code behind)
>>>
>>> Ken Egozi wrote:
>>>
>>> actual 302 redirect? or server side rewriting?
>>>
>>>
>>> On Thu, Oct 15, 2009 at 3:30 PM, Symon Rottem <[email protected]>wrote:
>>>
>>>> We normally just put a normal default.aspx file into the root of the web
>>>> app and have it redirect to the requested URL (/Home/Index.aspx in your
>>>> case).
>>>>
>>>> Symon.
>>>>
>>>> Symon Rottem
>>>> http://blog.symbiotic-development.com
>>>>
>>>>
>>>>   On Thu, Oct 15, 2009 at 3:06 PM, Daniel Hölbling <
>>>> [email protected]> wrote:
>>>>
>>>>> This is probably not possible without the routing module is it?
>>>>>  Since I'm not using it I hoped I could get around that..
>>>>>
>>>>>  greetings Daniel
>>>>>
>>>>> On Thu, Oct 15, 2009 at 3:03 PM, Daniel Hölbling <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Thanks ken!
>>>>>>
>>>>>> On Thu, Oct 15, 2009 at 2:58 PM, Ken Egozi <[email protected]> wrote:
>>>>>>
>>>>>>>
>>>>>>> http://www.kenegozi.com/blog/2009/02/10/monorail-routing-and-the-homepage-routing-rule.aspx
>>>>>>>
>>>>>>> On Thu, Oct 15, 2009 at 2:18 PM, Daniel Hölbling <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi, I'm facing a bit of a problem and maybe you can help me out.
>>>>>>>>
>>>>>>>>  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 here 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? Obviously I can't place a
>>>>>>>> Default.aspx that does a Server.Transfer in the root since .aspx is 
>>>>>>>> getting
>>>>>>>> mapped to MR :(
>>>>>>>>
>>>>>>>>  greetings Daniel
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>>> Ken Egozi.
>>>>>>> http://www.kenegozi.com/blog
>>>>>>> http://www.delver.com
>>>>>>> http://www.musicglue.com
>>>>>>> http://www.castleproject.org
>>>>>>> http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו
>>>>>>> בהמוניכם
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Ken Egozi.
>>> http://www.kenegozi.com/blog
>>> http://www.delver.com
>>> http://www.musicglue.com
>>> http://www.castleproject.org
>>> http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Ken Egozi.
> http://www.kenegozi.com/blog
> http://www.delver.com
> http://www.musicglue.com
> http://www.castleproject.org
> http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to