aspnet / AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)
Other
858 stars 354 forks source link

Help needed to explain the path syntax in system.webServer/handlers #284

Closed t-bzhan closed 3 years ago

t-bzhan commented 4 years ago

When trying to solve the problem to allow dot in URLs, I found that a lot of people suggested to add below content in the web.config:

<system.webServer>    
  <handlers>      
    <add name="UrlRoutingHandler" 
         type="System.Web.Routing.UrlRoutingHandler, 
               System.Web, Version=4.0.0.0, 
               Culture=neutral, 
               PublicKeyToken=b03f5f7f11d50a3a" 
         path="/Users/*" 
         verb="GET"/>      
  </handlers>
</system.webServer>

The solutions works, but I had a lot of URLs patterns to deal with. I could of course add a lot of entries, but it does not sound very elegant. I am wondering that could anyone explain the path syntax? If it is based on regex or glob pattern, I might been able to write a general path pattern for my requirements.

mkArtakMSFT commented 3 years ago

Thanks for contacting us. This is not a question about ASP.NET Web stack. @shirhatti do you know where this question should be asked?

mkArtakMSFT commented 3 years ago

Also, we recommend asking this in StackOverflow instead as a starting point.