Skip to content

HttpContextExtensions

Distinct from SAIF.Web.HttpContextExtensions: supplies the request-diagnostic dictionary and URL/application-name parsing helpers that HandleExceptionAttribute and SaifAuthorizeAttribute use to build log entries and route keys.

Purpose

  • Distinct from SAIF.Web.HttpContextExtensions: supplies the request-diagnostic dictionary and URL/application-name parsing helpers that HandleExceptionAttribute and SaifAuthorizeAttribute use to build log entries and route keys.

Context

  • Namespace: SAIF.Web.Mvc
  • Assembly/package: SAIF.Framework.Web.Mvc (source-shipping NuGet package)
  • Kind: static class

Public members

Member Signature Purpose
GetValuesAsDictionary(HttpRequestBase) public static IDictionary<string, string> GetValuesAsDictionary(this HttpRequestBase request) Builds the key/value diagnostic set (HttpMethod, IsAjaxRequest, RawUrl, Form, QueryString, ContentType, browser/user info, referrer) logged on an unhandled exception; see OP-08 step 2.
ApplicationName(this Uri) public static string ApplicationName(this Uri url) Returns the first path segment of the URL, used throughout this library as the application-name derivation for cross-application comparisons.
ControllerAndActionName(this Uri) public static string ControllerAndActionName(this Uri url) Derives a controller/action-shaped string from the URL path, used as the logging key passed to ILogService.LogException.

Sources

  • src/Web.Mvc/Extensions/HttpContextExtensions.cs