开发者

How to configure IIS 7.5 for extensionless url's on castlerock monorail

开发者 https://www.devze.com 2023-01-09 21:04 出处:网络
I\'m using Windows 7 (IIS 7.5) and have been struggling with getting it setup to use extensionless url\'s. This is what my web.config looks like:

I'm using Windows 7 (IIS 7.5) and have been struggling with getting it setup to use extensionless url's. This is what my web.config looks like:

<system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
        <clear />
        <add name="ASPX" path="*.aspx" verb="*" type="" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="4194304" />
        <add name="StaticF" path="*.*" verb="FILE, GET" type="" modules="StaticFileModule" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
        <add name="MR" path="*" verb="*" type="" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="4194304" />
    </handlers>
    </system.webServer>

Going to any url without an extension gives a 404 - resource cannot be found error thrown by A开发者_高级运维SP.NET. Any help would be greatly appreciated.


Assuming you do not want regular webforms you could remove the "ASPX" line

As for the mapping of "*" to MR, you need another handler factory to set in the "type" attribute:

<add name="MR" path="*" verb="*" 
     type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, 
           Castle.MonoRail.Framework" 
     modules="ManagedPipelineHandler" 
     scriptProcessor="" 
     resourceType="Unspecified" 
     requireAccess="Script" 
     allowPathInfo="false" 
     preCondition="" 
     responseBufferLimit="4194304" /> 
0

精彩评论

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