开发者

castle monorails httpHandlers

开发者 https://www.devze.com 2023-01-03 05:40 出处:网络
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 ex

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...

0

精彩评论

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