Domanda

Sto distribuendo un'applicazione Web Monorail Castle su Windows Server 2003. Ho già impostato la mappatura HttPhandler in Web.Config come segue:

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

Ma ogni volta che ho provato ad accedere http: //localhost/app/home/index.castle Il server Web restituisce sempre HTTP 404 non trovato. Sembra che la mappatura non sia gestita dal motore ASP.NET, come se mi mancassero un passo o due nella configurazione. Qualche soluzione?

È stato utile?

Soluzione

Perché stai usando IIS 6.0 il <system.webServer> La sezione viene ignorata e devi associare il .castle Estensione con il filtro ISAPI ASP.NET nel pannello di controllo IIS.

Phil Haack Blogged about Come raggiungere questo obiettivo con ASP.NET MVC e il .mvc estensione. Per te questa sarebbe l'estensione .castle:

enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top