title: Using SuppressFormsAuthenticationRedirectModule results in Object Moved Here rather than displaying the page content
body: <p>I am using SuppressFormsAuthenticationRedirectModule found at <a href="http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx" rel="nofollow">http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx</a> to prevent redirection of some HTTP 401 status and display a custom page instead.</p>
  
  <p>However, I am getting Object Moved Here as the output. How do I display my custom page instead?</p>
  
  <p>Page as follows</p>
  
  <pre><code>&lt;%@ Page Title="Unauthorized" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="UnauthorizedError.aspx.vb" Inherits="WebFormsTemplate.UnauthorizedError" %&gt;
  
  &lt;asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"&gt;
      &lt;h2&gt;Unauthorized&lt;/h2&gt;
      You do not have permission to view this page.
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Code behind</p>
  
  <pre><code>Imports System.Net
  Imports Appahoo.Web.WebForms
  
  Public Class UnauthorizedError
      Inherits System.Web.UI.Page
  
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
          SuppressFormsAuthenticationRedirectModule.SuppressAuthenticationRedirect(Me.Context, False)
          Me.Response.StatusCode = HttpStatusCode.Unauthorized
      End Sub
  End Class
  </code></pre>