Is there a way to determine whether an OnActionExecuting(ActionExecutingContext filterContext)
request is coming from the server or client?
Asked
Active
Viewed 30 times
0

keenns
- 863
- 4
- 14
- 26
1 Answers
0
I'm not totally sure this is completely correct, but the answer may be:
var requester = filterContext.HttpContext.Request.UrlReferrer == null ? "client" : "server";
(I.e. if there is a referrer url, then it's a server request, if there isn't it's a client request)

keenns
- 863
- 4
- 14
- 26