castle monorails httpHandlers
I have a question and I hope you can help me solve it... I have a castle monorails application. In web.config file in httphandlers I have *.aspx maped to monorails (my hosting does not suport other extensions...)
<add verb="*" path="*.aspx" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,Castle.MonoRail.Framework"/>
The problem is that I have some Webforms pages that I want to work with aspx... So I am adding something li开发者_JAVA技巧ke this to the web.config file...
<add verb="*" path="connector.aspx*" type="System.Web.UI.PageHandlerFactory"/>
<add verb="*" path="ChatPage.aspx*" type="System.Web.UI.PageHandlerFactory"/>
<add verb="*" path="Logon.aspx*" type="System.Web.UI.PageHandlerFactory"/>
Still it does not work.. What am I doing wrong?
Why the asterisk on the end? You should have your monorail-section last, and the specific ones first. You don't need to worry about the query string.
However, maybe you need to take into account to whether they are in a sub-directory when you're being this specific.
like, path="/folder/page.aspx"
I have finally fixed my problem creating a virtual directory where I have cleared the httphandlers
<httpHandlers><clear/>
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory"/>
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler"/>
</httpHandlers>
<httpModules>
<clear/>
</httpModules>
and now it works ok...
精彩评论