2
votes

I followed the tutorial below to create a custom login page for my Claims SP2010 site.

http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx

But all I get is a 403 FORBIDDEN text in Firefox. No luck in IE too. I searched over web for a couple of hours but still no luck.

Anyone experienced this situtation before?

Thanks.

2

2 Answers

2
votes

According to the referenced blog post, your custom login page should inherit from FormsSignInPage. I took a look at the class in Reflector and did not see anything that would cause a 403 error. However, in looking at its parent, IdentityModelSignInPageBase, I found the following in the OnLoad method:

protected override void OnLoad(EventArgs e)
{
    this.Context.Request.ServerVariables["FederationLoginPageRequest"] = "1";
    if (this.CheckForFormsAccess 
        && (AuthenticationMode.Forms != SPSecurity.AuthenticationMode))
    {
        SPUtilityInternal.Send403(this.Context);
    }
    if (!this.AllowCaching)
    {
        base.Response.Cache.SetNoStore();
    }
    base.ShowStandardControls = false;
    base.OnLoad(e);
}

CheckForFormsAccess is always true, so make sure your Authentication Mode is set to forms.

1
votes

You are probably being redirected to 403, because anonymous user not having access to display the custom error page.

Log files can give you a clue on why is that happening.

Alternatively:

In web.config files (one for the web application & the one in _layouts folder) set the following:

CustomErrors="Off" Debug="true" Callstack="true"