SharePoint Foundation 2013 - FBA Custom Login Page

Advertisement

Hi,
     i am trying to enable FBA in SharePoint Foundation 2013 and it works fine for default login page
     but when i try to create custom login page ( which is already working without any problems in SharePoint 2010 )  i receive an error when i try to authenticate user using the following code :
         SPClaimsUtility.AuthenticateFormsUser(Context.Request.UrlReferrer, txtUserName.Text, txtPassword.Text);
     i checked the Log file and found the following entries :
        - Application error when access /_layouts/CM Custom Login Page/Login.aspx, Error=Exception of type 'System.ArgumentException' was thrown.  Parameter name: httpApplication   at Microsoft.SharePoint.IdentityModel.SPClaimsUtility.AuthenticateFormsUser(Uri
context, String userName, String password)     at CM_Custom_Login_Page.Layouts.CmCustomLoginPage.Login.btnLogin_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  
        -  System.ArgumentException: Exception of type 'System.ArgumentException' was thrown.  Parameter name: httpApplication    at Microsoft.SharePoint.IdentityModel.SPClaimsUtility.AuthenticateFormsUser(Uri
context, String userName, String password)     at CM_Custom_Login_Page.Layouts.CmCustomLoginPage.Login.btnLogin_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      -  Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Exception of type 'System.ArgumentException'
was thrown.  Parameter name: httpApplication     at Microsoft.SharePoint.IdentityModel.SPClaimsUtility.AuthenticateFormsUser(Uri context, String userName, String password)     at CM_Custom_Login_Page.Layouts.CmCustomLoginPage.Login.btnLogin_Click(Object
sender, EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(...
      -  ...Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Advertisement

check first whether you are getting context or not, to me it looks like issue with Contrext.Request.UrlReferrer
try with this code
Uri url = new Uri(SPContext.Current.Web.Url);SPClaimsUtility.AuthenticateFormsUser(url, txtUserName.Text, txtPassword.Text);

October 11, 2015

SharePoint Foundation 2013 - FBA Custom Login Page

Hi,      i am trying to enable FBA in SharePoint Foundation 2013 and it works fine for default login page      but when i try to create custom login page ( which is already working without any problems in SharePoint 2010 )  i receive an error when i

Site Login Behavior For SharePoint Foundation 2013 Users With Expired Passwords?

What are the most user-friendly ways of getting external users with expired AD passwords back into the SharePoint site with a new working password? We already send automated email notifications to users reminding them to change their soon-to-expire p

SharePoint Foundation 2013 installation question / guide.

Hi All, I'm new in SharePoint and going to Install SharePoint Foundation 2013. What I want is after installation when I'll provide Site URL to my users they can able to access the site using there windows / system Login ID and Password which has been

Change PageTitle in SharePoint Foundation 2013

I'm trying to change the page title. My actual title looks like this. MyWebsite - page if I have a page url like this: www.mywebsite.com/SitePages/apple.aspx My page title will look like this: MyWebsite - apple I've created a custom list. Which store

MasterPages and SharePoint foundation 2013

Hi I have created a web application in SharePoint Foundation 2013. I also have created multiple subsite. I want to change the visual (branding) of the website (and all subsites). I have created a custom masterpage and wanted to set it as the default

Error Accessing Host Named Site Collections In SharePoint Foundation 2013

We have a new SharePoint Foundation 2013 server that has one web application two host named site collections. We get the "This page can't be displayed" message when we try to navigate to either of the site collections. Adding the server's IP to

Approving the access request gives error in Sharepoint Foundation 2013 / Email notification codepage problem

Hello On our SharePoint Foundation 2013 server approving Access Requests fails with "request approval failed" after pressing the approve button. The user is site administrator, site collection administrator and site owner. In the ulsviewer we se

Sharepoint foundation 2013 Search Service Application.

Hi all, I want to configure search application for sharepoint foundation 2013. I have followed some of the web links. But did not get success. Can you please provide me the working example of how to configure search application and run the crawl. And

When connecting to a server farm in sharepoint foundation 2013 cannot create new farm error: One or more types failed to load

When trying to create a new server farm in the sharepoint foundation 2013 we get a following error : The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. PS C:\Users\Administrator> New-SPConfigurationDatabase cmdlet

Sharepoint Foundation 2013 People field wont save data

Guys, having an issue with a list column. We have some columns that are Person or Group.  when we enter in a user, it finds it just fine saves it just fine. but if i come back into that list and edit some other field the Person or Group field is tota

SharePoint Foundation 2013 Optimization For Large File Transfer?

We are considering upgrading from  WSS 3.0 to SharePoint Foundation 2013. One of the improvements we want to see after the upgrade is a better user experience when downloading large files.  It can be done now, but it is not reliable. Our document lib

SharePoint Foundation 2013 Feature Pack and Site Templates

I have created a site using a site subscription and a SharePoint Foundation 2013 Feature Pack ( used the SP Foundation Feature Pack Script here http://gallery.technet.microsoft.com/office/SharePoint-2013-Foundation-d3d1637f that was created by Spence

Do I have to install SharePoint Foundation 2013 via a script in order to name my content databases without the GUID references?

Hi, I want to install SharePoint Foundation 2013 on a standalone server with SQL Express but I want to be able to name the content databases without their GUID references. Will I have to use an install script (AutoSPInstaller perhaps?) to achieve thi

Questions about a custom login page.

Could someone give me an example of a custom login page that does the error checking with p_error_code. I can't seem to get one to work correctly. I don't ever get any info in p_error_code when there is an error in login. You can email me the code at

SharePoint Foundation 2013 API

Hi, I Wonder which are the SharePoint API used to develop an application (only) for SharePoint Foundation 2013 ? I know that SharePoint 2013 Core server class Library contains these namespaces but when you read NET server API reference for SharePoint

Newsfeed with SharePoint Foundation 2013

Hi, I want to have a couple of news feeds on my SharePoint Foundation 2013 Sites. I want everyone to comment on these news feeds. Which list/web part would do the best jobs? Each individual user should have the ability to have an aggregated view of a

Not able to install SharePoint Foundation 2013 SP1 on a Windows Server 2012 R2

I am very new working with SharePoint and Server 2012. I had and am having a lot of problems installing SharePoint Foundation 2013. I get over the typical errors as download all prerequisites from the Internet, installing the Farms, etc. After I comp

Sharepoint foundation 2013: office docs can be opened in browser using IE but not in firefox or chrome?

Hi Sharepoint foundation 2013: why when we open an excel or word  using chrome and firefox browser it wants to download the file. It can be opened in browser using IE but not in firefox or chrome? Any issues? ThanksHello MGerio, Can you check what yo

Customized login page taking time to load

Dear Experts, Request you to kindly suggest how can I tune the Customized login Page. as it is taking time to load. Warm Regards Upendra Agrawal.Hi, Thanks for your quick reply, Changes which I made are only in the LogonTopArea.jsp and in LogonBottom

Error Uninstalling SharePoint Foundation 2013

I foolishly installed Sharepoint foundation on an exchange server and it broke my access to ECP and OWA.  I have attempted uninstallig but get the message "One or more required Office components failed to complete successfully.  For more information,