C# Класс EnterpriseWebLibrary.EnterpriseWebFramework.EwfApp

The HttpApplication class for a web site using EWF. Provides access to the authenticated user, handles errors, and performs other useful functions.
Наследование: System.Web.HttpApplication
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
BaseUrlOverrideGetter Func

Private Properties

Свойство Тип Описание
ExecuteWithBasicExceptionHandling void
GetDefaultBaseUrl string
GetRequestAppRelativeUrl string
Init void
getErrorPage System.PageInfo
getQueryParameters IEnumerable
getRequestBaseUrl string
getTransferPath string
handleAuthenticateRequest void
handleBeginRequest void
handleEndRequest void
handleError void
handleErrorIfOnErrorPage bool
handleErrorIfOnHandledErrorPage bool
handleErrorIfOnUnhandledExceptionPage bool
handlePostAuthenticateRequest void
rewritePathIfShortcutUrl void
set500StatusCode void
setStatusCode void
transferRequest void

Открытые методы

Метод Описание
GetPageViewDataModificationMethod ( ) : System.Action

Returns a method that executes data modifications that happen simply because of a request and require no other action by the user. Returns null if there are no modifications, which can improve page performance since the data-access cache does not need to be reset. WARNING: Don't ever use this to correct for missing loadData preconditions. For example, do not create a page that requires a user preferences row to exist and then use a page-view data modification to create the row if it is missing. Page-view data modifications will not execute before the first loadData call on post-back requests, and we provide no mechanism to do this because it would allow developers to accidentally cause false user concurrency errors by modifying data that affects the rendering of the page.

SendHealthCheck ( ) : void

Standard library use only.

Защищенные методы

Метод Описание
EwfApp ( ) : System

Registers event handlers for certain application events.

GetJavaScriptFiles ( ) : List

Creates and returns a list of JavaScript files that should be included on all EWF pages, including those not using the EWF user interface.

GetMediaTypeOverrides ( ) : IEnumerable

Gets the Internet media type overrides for the application, which are used when serving static files. Do not return null.

GetShortcutUrlResolvers ( ) : IEnumerable

Gets the shortcut URL resolvers for the application.

GetStyleSheets ( ) : List

Creates and returns a list of custom style sheets that should be used on all EWF pages, including those not using the EWF user interface.

RequestIsSecure ( HttpRequest request ) : bool

Returns true if the specified request is secure. Override this to be more than just HttpRequest.IsSecureConnection if you are using a reverse proxy to perform SSL termination. Remember that your implementation should support not just live installations, but also development and intermediate installations.

getRequestBasePath ( HttpRequest request ) : string

Returns the base path for the specified request. Override this if you are using a reverse proxy and are changing the base path. Never return null. Return the empty string to represent the root path. Remember that your implementation should support not just live installations, but also development and intermediate installations.

getRequestHost ( HttpRequest request ) : string

Returns the host name for the specified request. Override this if you are using a reverse proxy that is changing the Host header. Include the port number in the return value if it is not the default port. Never return null. If the host name is unavailable (i.e. the request uses HTTP 1.0 and does not include a Host header), return the empty string, which will cause a 400 status code to be returned. Remember that your implementation should support not just live installations, but also development and intermediate installations.

Приватные методы

Метод Описание
ExecuteWithBasicExceptionHandling ( System.Action handler, bool setErrorInRequestState, bool set500StatusCode ) : void
GetDefaultBaseUrl ( bool secure ) : string
GetRequestAppRelativeUrl ( HttpRequest request, bool disableLeadingSlashRemoval = false ) : string
Init ( Type globalType, AppMetaLogicFactory metaLogicFactory ) : void
getErrorPage ( System.PageInfo ewfErrorPage ) : System.PageInfo
getQueryParameters ( string url ) : IEnumerable
getRequestBaseUrl ( HttpRequest request ) : string
getTransferPath ( EnterpriseWebLibrary.EnterpriseWebFramework.ResourceInfo resource ) : string
handleAuthenticateRequest ( object sender, EventArgs e ) : void
handleBeginRequest ( object sender, EventArgs e ) : void
handleEndRequest ( object sender, EventArgs e ) : void
handleError ( object sender, EventArgs e ) : void

This method will not work properly unless the application is initialized, RequestState is not null, and the authenticated user is available.

handleErrorIfOnErrorPage ( string errorEvent, Exception exception ) : bool
handleErrorIfOnHandledErrorPage ( string errorEvent, Exception exception ) : bool
handleErrorIfOnUnhandledExceptionPage ( string errorEvent, Exception exception ) : bool
handlePostAuthenticateRequest ( object sender, EventArgs e ) : void
rewritePathIfShortcutUrl ( ) : void
set500StatusCode ( string description ) : void
setStatusCode ( int code ) : void
transferRequest ( System.PageInfo page, bool completeRequest ) : void

Описание методов

EwfApp() защищенный Метод

Registers event handlers for certain application events.
protected EwfApp ( ) : System
Результат System

GetJavaScriptFiles() защищенный Метод

Creates and returns a list of JavaScript files that should be included on all EWF pages, including those not using the EWF user interface.
protected GetJavaScriptFiles ( ) : List
Результат List

GetMediaTypeOverrides() защищенный Метод

Gets the Internet media type overrides for the application, which are used when serving static files. Do not return null.
protected GetMediaTypeOverrides ( ) : IEnumerable
Результат IEnumerable

GetPageViewDataModificationMethod() публичный Метод

Returns a method that executes data modifications that happen simply because of a request and require no other action by the user. Returns null if there are no modifications, which can improve page performance since the data-access cache does not need to be reset. WARNING: Don't ever use this to correct for missing loadData preconditions. For example, do not create a page that requires a user preferences row to exist and then use a page-view data modification to create the row if it is missing. Page-view data modifications will not execute before the first loadData call on post-back requests, and we provide no mechanism to do this because it would allow developers to accidentally cause false user concurrency errors by modifying data that affects the rendering of the page.
public GetPageViewDataModificationMethod ( ) : System.Action
Результат System.Action

GetShortcutUrlResolvers() защищенный абстрактный Метод

Gets the shortcut URL resolvers for the application.
protected abstract GetShortcutUrlResolvers ( ) : IEnumerable
Результат IEnumerable

GetStyleSheets() защищенный Метод

Creates and returns a list of custom style sheets that should be used on all EWF pages, including those not using the EWF user interface.
protected GetStyleSheets ( ) : List
Результат List

RequestIsSecure() защищенный Метод

Returns true if the specified request is secure. Override this to be more than just HttpRequest.IsSecureConnection if you are using a reverse proxy to perform SSL termination. Remember that your implementation should support not just live installations, but also development and intermediate installations.
protected RequestIsSecure ( HttpRequest request ) : bool
request System.Web.HttpRequest
Результат bool

SendHealthCheck() публичный Метод

Standard library use only.
public SendHealthCheck ( ) : void
Результат void

getRequestBasePath() защищенный Метод

Returns the base path for the specified request. Override this if you are using a reverse proxy and are changing the base path. Never return null. Return the empty string to represent the root path. Remember that your implementation should support not just live installations, but also development and intermediate installations.
protected getRequestBasePath ( HttpRequest request ) : string
request System.Web.HttpRequest
Результат string

getRequestHost() защищенный Метод

Returns the host name for the specified request. Override this if you are using a reverse proxy that is changing the Host header. Include the port number in the return value if it is not the default port. Never return null. If the host name is unavailable (i.e. the request uses HTTP 1.0 and does not include a Host header), return the empty string, which will cause a 400 status code to be returned. Remember that your implementation should support not just live installations, but also development and intermediate installations.
protected getRequestHost ( HttpRequest request ) : string
request System.Web.HttpRequest
Результат string

Описание свойств

BaseUrlOverrideGetter публичное статическое свойство

public static Func BaseUrlOverrideGetter
Результат Func