Colon in url, microsoft.com has a workaround

Last post 07-20-2009 6:46 PM by allroadCole. 2 replies.

Sort Posts:

  • Colon in url, microsoft.com has a workaround

    02-27-2009, 11:07 AM
    • Member
      point Member
    • kimaris
    • Member since 04-25-2007, 9:14 AM
    • Posts 4

     Hello All,

    Spend nearly a day to find a workaraund to my problem, here it is:

    Config: IIS7 + Vista

    I have an url rewriting module implemented as IHttpModule

     
     <modules>
    
    ...
          <add name="UrlTransformerModule" type="UrlHttpModule.ParaPhraserHttpModule,UrlHttpModule"/>
    
    ...
    
    </modules> 
     

    and a wildcard in web.config

     
    <handlers>
    
    <add name="Wildcard" path="*" verb="GET" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="" />
    
    </handlers> 
     

    and everything works pretty cool, so I can handle paths like  www.example.com/Path/Path2 with no problem, but now I require to parse url with a colon, like this:

    www.example.com/user:someone 

     That was the task.

    Here's what I've faced:

    1) First of all we receive 400 - bad request when trying to request url with a column, and this happens before my module, so I cannot handle this.

    2) After several steps (editing registry) we receive 

    [NotSupportedException: The given path's format is not supported.]
    System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +719

     ...

    again before my module gets called. Even custom errors do not work with that error.

     

    I've tried almost anything I know, and almost gave up, but then I visited www.microsoft.com/user:me and I received a normal page!!! So it IS possible somehow to react on such error and redirect user (or rewrite response on custom error page).

    If someone knows or has a glue how it is done on microsoft.com I would be VERY thankfull.

  • Re: Colon in url, microsoft.com has a workaround

    03-19-2009, 9:28 AM

    I need this too!  I'm trying to write an OWA proxy - which works except that OWA uses the subject in the URL for emails, and RE: and FW: are quite common in email subjects.

    Did you get anywhere with it?

  • I have the same problem! did you ever find a workaround?

    07-20-2009, 6:46 PM
    • Member
      5 point Member
    • allroadCole
    • Member since 02-13-2007, 9:32 PM
    • Posts 9

    I have been working on this for days, my URL even has the : encoded and it is still throwing the error! any help is very much appreciated, thanks.

Page 1 of 1 (3 items)