Monday, July 12, 2010

How to change the status code of the Page Not Found page to 404 - Asp.net

public partial class PageNotFound : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        Response.Buffer = true;
        Response.StatusCode = 404;
        Response.Status = "404 Not Found";
    }
}

No comments:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...