Asp.Net Common Handler Routing

I have a common handler that displays images of logos of community members:

http://site.com/logo.ashx?memberid=123

Now I want to use it by specifying the url:

http://site.com/logo/john.jpg

So, I would create a route for this (pattern: "logo / {username} .jpg"). But, my problem is how can I get {username} when inside the ProcessRequest () of my common handler? This is not a page, so I cannot get the .RouteData.Values ​​page.

Any ideas?

Thanks Andrew

+3
source share

Source: https://habr.com/ru/post/1765709/


All Articles