城堡单轨列车 httpHandlers
我有一个问题,希望你能帮我解决... 我有一个城堡单轨列车应用程序。在 httphandlers 中的 web.config 文件中,我将 *.aspx 映射到单轨(我的主机不支持其他扩展...)
<add verb="*" path="*.aspx" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,Castle.MonoRail.Framework"/>
问题是我有一些 Webforms 页面想要使用 aspx...所以我添加像这样的 web.config 文件...
<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"/>
仍然不起作用..我做错了什么?
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 like 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么最后有星号?您应该将单轨列车部分放在最后,然后将特定的部分放在前面。您无需担心查询字符串。
但是,当您如此具体时,也许您需要考虑它们是否位于子目录中。
例如,
path="/folder/page.aspx"
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"
我终于解决了创建虚拟目录的问题,我已经清除了 httphandlers
,现在它可以正常工作了...
I have finally fixed my problem creating a virtual directory where I have cleared the httphandlers
and now it works ok...