开发者

How to tell who called an HttpHandler

How can I tell from within an ASP.NET HttpHandler if it is executing because o开发者_Go百科f a call to

Server.Execute("myHandler.ashx")

or because of the user linking directly to myHandler.ashx? (Besides using a querystring parameter).


Can't you add a querystring parameter? If present comes from Server.Execute(), otherwise direct link.


You should still have access to the HttpContext from within the handler, so you should still be able to access cookies and session to determine any authenticated users (if that's what you're looking for).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜