0

I am having a SharePoint 2010 server with FBA confgured for my claims based web appln. I have created a custom login page with a forgot password link.

When the user clicks on the link, it has to navigate to a page where he keys in the email id of the user and he will get a mail regarding this to reset the password.

But now, due to some unknown reason, it's not redirecting to the forgotpassword web part page. Its still again and again opening the login page only.

I have enabled the anonynmous access for this web application.

1

I assume this is just on a standard web part page in a document library? In addition to the site, have you also configured the document library to allow anonymous access? If not, you need to do that. If you have, it can still require authentication if you have any content on the page that requires authentication (For example having an image on the page in a publishing site that has not been published yet).

The other alternative is to create an Application Page, which can be set to allow anonymous (even if the site isn't set to allow anonymous access). However you need to use Visual Studio to create the application page. The code behind for the application page needs to look like this:

public partial class MyApplicationPage : UnsecuredLayoutsPageBase
{
    protected override bool AllowAnonymousAccess
    {
        get
        {
            return true;
        }
    }

    protected override bool AllowNullWeb
    {
        get
        {
            return true;
        }
    }
}
  • Yes. As you mentioned I tried the application page approach. It derives from unsecuredlayoutspahebase. But still it didn't populated. But I didn't set the anonymous access set to true for the sitte pages library in the first case. – userAZLogicApps Sep 27 '16 at 18:04
  • 1
    There's a little more that you need to do for the application page. I've included a sample, in case you missed any of it. You don't need to set anonymous access if you use an application page. Potentially it can still redirect to the login page if you include any content or calls that need authentication. Start with a blank page, which should work fine, and add to it from there - then you'll know what's causing your authentication issues. – Chris Coulson Sep 28 '16 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.