Search code examples
c#asp.nethttpcontext

Can I tell that a request has come from a server transfer, and is not user-initiated?


In .NET, is there any way that I can tell from the HttpContext or HttpApplication that a particular request is the result of a Server.Transfer() rather than a client-initiated request?


Solution

  • You can test Request.IsLocal to see if the request was from the local computer. Obviously, you will need to test this from a different computer to verify it is working.