Why is IHttpHandler's ProcessRequest method not getting the original URL in the context in .NET Framework?

35 Views Asked by At

I have a class that implements IHttpHandler in a .NET Framework app, and a ProcessRequest method that implements IHttpHandler.

public void ProcessRequest(HttpContext context)
{
  //some logic
}

I added a breakpoint on the first line of ProcessRequest to see the values of context.Request.Path and context.Request.Url. I noticed I never get the URL that launched the app. I get the ones for various *.css and *.js files that got loaded as assets. For example, the first one was bootstrap.css.

Why am I not getting the original URL using context.Request.Url or context.Request.Path?

0

There are 0 best solutions below