我想对我的服务器的所有调用调用使用路由,然后仅对其中一些使用路由(取决于我的数据库中的值)。
我知道如何完成路由,我不知道如何在IRouteHandler中中止路由。
离
if (routing)
{
// do routing
var page = BuildManager.CreateInstanceFromVirtualPath(VirtualPath, typeof(IHttpHandler)) as IHttpHandler;
return page;
}
else
{
// proceed as if no routing has been made
}
答案 0 :(得分:0)
Respone.Redirect()
然后将它们重定向到错误或默认页面。
答案 1 :(得分:0)