Back to product page

StatusCode property


Holds status code returned to the client.

Type

StatusCodes enumeration

Syntax

  • C#
  • VB.NET
StatusCodes StatusCode {get; set; };

Property StatusCode As StatusCodes

Remarks

StatusCode property is on of the most important properties in your Response. It defines result of the request - if it was successful 200 (OK) which means that client will receive response correctly, or the error occurred. Most typical error to return is 404 (Not found) which is returned when client tries to access page that doesn't exist on your server. But, you are free to return any of these in above table, or even new ones (just make sure client understands your response status code).

Setting this property depends only on your choice and decision. However, if you set Delivery = Automatic, then wodWebServer.NET will try to access requested resource before RequestDone event is fired, and will return (200 OK) if resource is found, or (404 Not found) if resource doesn't exist on your system.

When this property is changed, StatusText and StatusLine properties are updated accordingly.

Platforms

Windows