4

I need to support dots in urls such as http://myserver/product/find?name=the.product.name for a pool running in Classic mode.

There are good questions and answers here:

but none of them work for an application pool running in Classic mode.

I have tried:

  1. <httpRuntime relaxedUrlToFileSystemMapping="true">...
  2. <modules runAllManagedModulesForAllRequests="true">...
  3. <handlers><add name="ApiURIs-ISAPI-Integrated-4.0" path="/people/*" verb="..." type="System.Web.Handlers.ransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  4. <modules>...<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" />

none of them work in Classic.

The only unacceptable workaround seem to be to add an trailing / if the dot is in the URL or an extra parameter if the dot is in the params:

  • http://myserver/product/find.all/
  • http://myserver/product/find?name=the.product.name&useless=1

I cannot switch to Integrated.

Community
  • 1
  • 1
Sylvain
  • 19,099
  • 23
  • 96
  • 145

1 Answers1

2

Try this to set the correct handler for classicMode

  <handlers>
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" 
      path="*" 
      verb="GET,HEAD,POST,DEBUG,DELETE,OPTIONS" 
      modules="IsapiModule" 
      scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" 
      preCondition="classicMode,runtimeVersionv4.0,bitness32" 
      responseBufferLimit="0" />

    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" 
      path="*" 
      verb="GET,HEAD,POST,DEBUG,DELETE,OPTIONS" 
      modules="IsapiModule" 
      scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" 
      preCondition="classicMode,runtimeVersionv4.0,bitness64" 
      responseBufferLimit="0" />
  </handlers>
Sylvain
  • 19,099
  • 23
  • 96
  • 145
Sebastien
  • 570
  • 3
  • 5
  • 18