Gets or sets the URL to which the application is redirected when any EAUpload exceptions occur while request is processing by EAUpload.
Namespace:
EasyAlgo.EAUploadAssembly: EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.2.0
Syntax
| C# |
|---|
public string EAUploadExceptionRedirect { get; set; } |
| Visual Basic (Declaration) |
|---|
Public Property EAUploadExceptionRedirect As String |
Field Value
Type: System..::.StringThe String that specifies the absolut or relative URL to which the application is redirected when any EAUpload exceptions occur while request is processing by EAUpload. Default value is empty string.
Remarks
This property is a reflection of EAUpload configuration parameter (<EasyAlgo.EAUpload>/<Exceptions ... EAUploadExceptionRedirect="" ... >).
When EAUploadExceptionRedirect is not specified and ThrowErrorsImmediately property or parameter is specified as false, a generic error is displayed instead. The described above behavior is actual if request is read to end or ProcessRequestOnError specified as true. The URL may be absolute (for instance, http://www.yoursite.com/ErrorPage.htm) or it may be relative. A relative URL such as /ErrorPage.htm or ~/ErrorPage.htm is relative to the root path of the application.
The eauploaderrorpath and the UploadId parameters will be included in redirect url automatically.
Note:
If ProcessRequestOnError is specified as flase and an exception occurs at the request reading stage then there is no way to send a some response to the client(browser), therefore redirection and generic errors are not working.
If EAUploadExceptionRedirect property or parameter is specified then request is redirected regardless of UploadEnvironment..::.ThrowErrorsImmediately property value or ThrowErrorsImmediately parameter value.
Note:If you want to change this property at the runtime, you can define its at the Initializing stage or at the Uploading stage of an upload (see EasyAlgo.EAUpload..::.UploadState for more information).
Also if you have change this property for the whole of EAUpload component (EAUploadModule..::.CommonEnvironment property), then new value will take effect for the all processing and new uploads.
When EAUploadExceptionRedirect is not specified and ThrowErrorsImmediately property or parameter is specified as false, a generic error is displayed instead. The described above behavior is actual if request is read to end or ProcessRequestOnError specified as true. The URL may be absolute (for instance, http://www.yoursite.com/ErrorPage.htm) or it may be relative. A relative URL such as /ErrorPage.htm or ~/ErrorPage.htm is relative to the root path of the application.
The eauploaderrorpath and the UploadId parameters will be included in redirect url automatically.
- Value of the eauploaderrorpath parameter this is a name of the resource during the request to which an exception was occurred
- Value of the UploadId parameter this is a unique identifier of Upload object. Name of the parameter depends on UploadIDParameter property value.
If EAUploadExceptionRedirect property or parameter is specified then request is redirected regardless of UploadEnvironment..::.ThrowErrorsImmediately property value or ThrowErrorsImmediately parameter value.
Examples
You can find an example in the description of UploadEnvironment class.
