简体   繁体   English

在 Windows Server 2003 上部署 Castle Monorail

[英]Deploying Castle Monorail on Windows Server 2003

I'm deploying a castle monorail web application to Windows Server 2003. I've already set the httphandler mapping in web.config as follows:我正在将城堡单轨列车 web 应用程序部署到 Windows Server 2003。我已经在 web.config 中设置了 httphandler 映射,如下所示:

<httpHandlers>
     <add verb="*" path="*.castle" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework" />
</httpHandlers>

<system.webServer>
    <handlers>
      <add name="castle page" path="*.castle" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
    </handlers>
</system.webServer>

But whenever I tried to access http://localhost/app/Home/Index.castle the web server always returns HTTP 404 Not Found.但是每当我尝试访问http://localhost/app/Home/Index.castle时,web 服务器总是返回 HTTP 404 Not Found。 It looks like the mapping is not handled by ASP.NET engine, like I've been missing a step or two in the configuration.看起来映射不是由 ASP.NET 引擎处理的,就像我在配置中缺少一两个步骤一样。 Any solution?有什么解决办法吗?

Because you are using IIS 6.0 the <system.webServer> section is ignored and you need to associate the .castle extension with the ASP.NET ISAPI filter in the IIS control panel.因为您使用的是 IIS 6.0,所以<system.webServer>部分将被忽略,您需要将.castle扩展名与 Z5DA5ACF461B4EFB7E76EC861065B212Z 控制面板中的 ASP.NET ISAPI 过滤器相关联。

Phil Haack blogged about how to achieve this with ASP.NET MVC and the .mvc extension. Phil Haack 在博客中介绍了如何使用 ASP.NET MVC 和.mvc扩展来实现这一目标。 For you this would be the.castle extension:对你来说,这将是 the.castle 扩展:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM