• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class BaseHttpHandler

Inheritance
System.Object
BaseHttpHandler
Namespace: DotNetNuke.Framework
Assembly: DotNetNuke.dll
Syntax
public abstract class BaseHttpHandler : IHttpHandler

Properties

| Improve this Doc View Source

Content

Gets the string representation of the body of the incoming request.

Declaration
public string Content { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ContentEncoding

Gets the content encoding for the response object.

Declaration
public virtual Encoding ContentEncoding { get; }
Property Value
Type Description
Encoding

The content encoding for the response object.

| Improve this Doc View Source

ContentMimeType

Gets the content MIME type for the response object.

Declaration
public virtual string ContentMimeType { get; }
Property Value
Type Description
System.String

The content MIME type for the response object.

| Improve this Doc View Source

Context

Gets the object for the incoming HTTP request.

Declaration
public HttpContext Context { get; }
Property Value
Type Description
HttpContext
| Improve this Doc View Source

HasPermission

Gets a value indicating whether the requester has the necessary permissions.

Declaration
public virtual bool HasPermission { get; }
Property Value
Type Description
System.Boolean

true if the user has the appropriate permissions otherwise, false.

Remarks

By default all authenticated users have permssions. This property is only enforced if RequiresAuthentication is true.

| Improve this Doc View Source

IsReusable

Declaration
public virtual bool IsReusable { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Request

Gets the object for the incoming HTTP request.

Declaration
public HttpRequest Request { get; }
Property Value
Type Description
HttpRequest
| Improve this Doc View Source

RequiresAuthentication

Gets a value indicating whether this handler requires users to be authenticated.

Declaration
public virtual bool RequiresAuthentication { get; }
Property Value
Type Description
System.Boolean

true if authentication is required otherwise, false.

| Improve this Doc View Source

Response

Gets the object associated with the Page object. This object allows you to send HTTP response data to a client and contains information about that response.

Declaration
public HttpResponse Response { get; }
Property Value
Type Description
HttpResponse

Methods

| Improve this Doc View Source

HandleRequest()

Handles the request. This is where you put your business logic.

Declaration
public abstract void HandleRequest()
Remarks

This method should result in a call to one (or more) of the following methods:

context.Response.BinaryWrite();

context.Response.Write();

context.Response.WriteFile();

  someStream.Save(context.Response.OutputStream);

etc...

If you want a download box to show up with a pre-populated filename, add this call here (supplying a real filename).

Response.AddHeader("Content-Disposition"
  , "attachment; filename=\"" + Filename + "\"");
| Improve this Doc View Source

ProcessRequest(HttpContext)

Processs the incoming HTTP request.

Declaration
public void ProcessRequest(HttpContext context)
Parameters
Type Name Description
HttpContext context

Context.

| Improve this Doc View Source

RespondFileNotFound()

Helper method used to Respond to the request that the file was not found.

Declaration
protected void RespondFileNotFound()
| Improve this Doc View Source

RespondForbidden()

Helper method used to Respond to the request that the request in attempting to access a resource that the user does not have access to.

Declaration
protected void RespondForbidden()
| Improve this Doc View Source

RespondInternalError()

Helper method used to Respond to the request that an error occurred in processing the request.

Declaration
protected void RespondInternalError()
| Improve this Doc View Source

SetResponseCachePolicy(HttpCachePolicy)

Sets the cache policy. Unless a handler overrides this method, handlers will not allow a respons to be cached.

Declaration
public virtual void SetResponseCachePolicy(HttpCachePolicy cache)
Parameters
Type Name Description
HttpCachePolicy cache

Cache.

| Improve this Doc View Source

ValidateParameters()

Validates the parameters. Inheriting classes must implement this and return true if the parameters are valid, otherwise false.

Declaration
public abstract bool ValidateParameters()
Returns
Type Description
System.Boolean

true if the parameters are valid, otherwise false.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS