Monday, July 25, 2011

SharePoint 2010 Membership Error :“The method or operation is not implemented”

Hello Friends
I was working with “Claims based authentication” in SharePoint 2010, develop registration page for new user so first I need to check whether that user already exists or not so when I checked for GetUser of Membership it always  throws error
I got this error: “The method or operation is not implemented”.
Nothing about my membership provider was custom, it was all default .Net stuff. I also found this to happen on other methods provided by the Membership object.
We can find out from here
MembershipProvider _provider = Membership.Providers["MyCustomMembershipProvider"];
MembershipUser user = _provider.GetUser(“username”, true);

if (user == null)
{
}
 ["MyCustomMembershipProvider "] is provider name in web config file

Hope this helps!!!
Disha Shah

Thursday, July 21, 2011

Error occurred in deployment step 'Retract Solution': Attempted to perform an unauthorized operation.

I have created one Sharepoint 2010 WebApplication which uses classic based authentication and add myself as "Site Collection Administrator", then I need to convert Webapplication authentication type "classic based authentication" from "Claims Based Authentication". Then when that user tried to deploy solution it gives this error.

"Error occurred in deployment step 'Retract Solution': Attempted to perform an unauthorized operation."

How to solve this one?

1> In SharePoint 2010 go to Central Administration - Manage web applications (under Application    Management).

2> There you select the SharePoint application and press "User Policy" in the ribbon. Over there you add your user you want  deploy with and give him full control.
Disha Shah

Wednesday, July 20, 2011

How to Create a SharePoint Application Page for Anonymous Access

There are some occasions in which we need to give anonymous access to SharePoint Application Pages , but on that webapplication does not give  the anonymous access. Examples like Registration Page, Forgot Password page. So how to do that?
We need to do three things for that.
1. protected override bool AllowAnonymousAccess
        {
            get
            {
                return true;
            }
        }

2. Instead, you need to use another base class for your anonymous application page called UnsecuredLayoutsPageBase. MSDN reference at: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.unsecuredlayoutspagebase.aspx

3. Please make sure we don't use DynamicMasterPageFile="~/masterurl/default.master" your application layout pag .aspx file.
change it to MasterPageFile="~/_layouts/simple.master"