Have a look at this posting, it may help - 
http://hammett.castleproject.org/?p=283

On Oct 17, 3:30 am, andypike <[email protected]> wrote:
> Hi all,
>
> I've searched around and can't find an answer to this so hopefully
> someone here can help.
>
> We have a MR application running happily on an IIS 6 box. We are now
> upgrading the server to one with IIS 7 and have one issue.
>
> We have a folder in the root called "Content" that contains our static
> files (images, css etc). We also have a ContentController with various
> actions. In IIS 6 this wasn't a problem as MonoRail would handle it
> and pass on the request if there was no matching action. But now on
> the IIS 7 box we are having problems with either the static files not
> being served or the controller actions not being served.
>
> Here is our current system.webServer element in the web.config:
>
> <system.webServer>
>         <modules>
>             <add name="routing"
> type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,Castle.MonoRail.Framework"
> preCondition="managedHandler" />
>         </modules>
>         <handlers accessPolicy="Script, Execute, Read">
>             <clear />
>             <add name="ASPX" path="*.aspx" verb="*"
> type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified"
> preCondition="integratedMode" />
>                         <add name="Static1" path="/Content/*.*" verb="*"
> type="System.Web.StaticFileHandler" />
>                         <add name="Static2" path="/Content/**/*.*" verb="*"
> type="System.Web.StaticFileHandler" />
>                         <add name="Static3" path="/Content/**/**/*.*" verb="*"
> type="System.Web.StaticFileHandler" />
>                         <add name="Static4" path="/Content/**/**/**/*.*" 
> verb="*"
> type="System.Web.StaticFileHandler" />
>             <add name="Block-NVelocity" path="*.vm" verb="*"
> type="System.Web.HttpForbiddenHandler, System.Web"
> modules="ManagedPipelineHandler" scriptProcessor=""
> resourceType="Unspecified" requireAccess="Script"
> preCondition="integratedMode,runtimeVersionv2.0" />
>                         <add name="Block-Config" path="*.config" verb="*"
> type="System.Web.HttpForbiddenHandler, System.Web"
> modules="ManagedPipelineHandler" scriptProcessor=""
> resourceType="Unspecified" requireAccess="Script"
> preCondition="integratedMode,runtimeVersionv2.0" />
>             <add name="Monorail-All" path="*" verb="*"
> type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
> Castle.MonoRail.Framework" modules="ManagedPipelineHandler"
> scriptProcessor="" resourceType="Unspecified" requireAccess="Script"
> preCondition="" />
>         </handlers>
>         <validation validateIntegratedModeConfiguration="false" />
>     </system.webServer>
>
> We are also using Routing, here is our routing setup:
>
> rules.Add(new PatternRoute("[controller]/[action]")
>                 .DefaultForArea().IsEmpty
>                 .DefaultForController().Is("Home")
>                 .DefaultForAction().Is("Index"));
>
> I'd very much like to avoid renaming the controller or static folder,
> and I'm sure this is possible as it works in IIS 6.
>
> Any ideas what I am missing or have done wrong? I'm pretty new to IIS7
> so if there any any other setting I need to change, please let me
> know.
>
> Thanks in advance
>
> Andy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to