标签: asp.net routing httphandler generic-handler
我有一个提供成员徽标图像的通用处理程序:
http://site.com/logo.ashx?memberid=123
现在,我想通过加密网址来使用它:
http://site.com/logo/john.jpg
所以我会为此创建一条路线(模式:“logo / {username} .jpg”)。但是,我的问题是 - 如何在我的通用处理程序的ProcessRequest()内部检索{username}?它不是一个页面,所以我无法获得Page.RouteData.Values。
有什么想法吗?
谢谢你, 安德烈
答案 0 :(得分:4)
我发现这篇好文章回答了我的问题:http://petesdotnet.blogspot.com/2009/09/generic-handlers-and-aspnet-routing.html