Forms authentication login page issue

George2
  • Forms authentication login page issue George2

    I am using SharePoint 2007 Enterprise + Publishing portal template + Windows Server 2008. And I am developing using ASP.Net + C# + .Net 3.5 + VSTS 2008 on SharePoint Server 2007. I am developing a custom authentication provider based on Forms authentication. When an anonymous access a page which needs authentication, by the default behavior, the login page will be redirected.

    My requirement is, when a user access a page for the first time in my SharePoint site which needs authentication,

    1. if there is a special URL variable in current http session called "Identity", I want to treat the user as authenticated user and using the value of the "Identity" URL variable to be the authenticated user name of SharePoint (for example, accessing my SharePoint site by URL http://mysite/default.aspx?Identity=foo, then I will treat authenticated user "foo");

    2. if there is a on URL variable in current http session variable called "Identity", the login page will be redirected to go through the default Forms authentication behavior.

    Any ideas how to implement requirement 1 and 2?

  • You would probably need to write something custom.

    Write an asp.net page with Login control and perform your logic. Put the page under the layouts folder. Then change the "loginUrl" attribute of the "forms" element of the web.config to point to the new page you have created.

    You might also be able extend the existing login application page.

Tags
publishing-site authentication forms-authentication
Related questions and answers
  • I am using SharePoint 2007 Enterprise + Publishing portal template + Windows Server 2008. I am developing using VSTS 2008 + C# + .Net 3.5. I need to implement SSO (Single Sign On feature) with another site. The SSO protocol is like this, The other site will send me information like http://mysitename/default.aspx?Identity=abc or like http://mysitename/default.aspx (mysitename is the site which I am developing); If the value Identity variable is null, it means anonymous user. And if the Identity value is not null (means an authenticated user), I will using a WCF interface to find user

  • I am using SharePiont Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5. I am wondering whether SharePoint has any means to set an anonymous... default.aspx (i.e. no need to let the user know password of administrator if the user connects from a special machine with a special IP address). Another example is when anonymous user connects my site using special connection string, like http://mysite/default.aspx?specialtestuser=foo,then I will set current anonymous to be foo.Appreciate if any code samples to reference? BTW: I am using Forms

  • Possible Duplicate: Integrating SharePoint user profiles with forms authentication I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I have deployed a publishing portal. It is using a custom forms authentication solution, which is described in the following URL. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SharePoint Server 2007 SDK. http://msdn.microsoft.com/en-us/library/bb975135.aspx My question is how do I implement a user profile function if I use such a membership provider? By user profile function I mean: a logged in user could

  • This is a very strange issue I am having. My client is experiencing poor performance (20 sec per page load or so) when accessing their SharePoint 2007 site that is hosted somewhere externally by a hosting provider. In fact it is not just that particular SharePoint site - we tried accessing another SharePoint site that is online and we were experiencing the same performance issues. Now it is ONLY slow if ALL of these conditions are true: User is using IE6 User is using a machine connected to the client's company network (there's a proxy Configured) User is authenticated (Windows

  • Server 2008 R2 Server Core run the VM and joined my Windows 7 machine to that domain Installed SQL Server 2008 R2 on Wind7 machine Followed instructions http://msdn.microsoft.com/en-us... without any particular rights: SPF_DATABASE for database credentials SPF_ADMIN for farm credentials Added domain administrator in SQL Server 2008 R2 with sysadmin rights started Sharepoint Powershell as domain administrator (so I have rights to access domain accounts) I didn't install SQL Server 2008 KB 970315 x64, because I'm running R2 version - as I understand this is SQL Server 2008 SP2

  • We have an issue in accessing custom a DB from a SharePoint custom webpart. When we try to access the custom DB from SharePoint webpart we are getting the error "Login Failed for User NTAuthority..." and DB Server Instance has the same user "domain\someuser" and has permission to Custom DB. Web.config entries: <authentication mode="Windows" /> <identity impersonate="true" />... impersonate="true" username=”domain\someuser” password=”***” /> If we add “NTAuthority\Anonymous Logon” as a user in custom DB server instance. If we use Sql Authentication “Data Source=xxxx

  • I am using SharePoint 2007 Enterprise + Publishing portal template + Windows Server 2008. And I am developing using ASP.Net + C# + .Net 3.5 + VSTS 2008 on SharePoint Server 2007. I am developing a custom Forms authentication based on Forms authentication interface. I am learning using Forms Authentication with SharePoint and my confusion is about this method -- ValidateUser of Forms Authentication, here is MSDN link, http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.validateuser.aspx My confusions are about which component will call ValidateUser method? Do I

  • I am using SharePoint 2007 Server x64 on Windows Server 2008 x64. I create a new SharePoint web application with a new site collection at the root of the web application. I select the template... the default.aspx after login but anonymous users could still see content like in the following list. How do I remove this for an anonymous user? Enable anonymous access You must enable anonymous access on the site collection for the forms authentication logon page to work from Office SharePoint Server. Contact your administrator to have anonymous access enabled in Central Administration and IIS. Manage

  • I need to show a popup message (couple of div tags) when a user tries to do the following: Leaves the current SharePoint site and navigates to an external URL. Closes the browser. I tried using the JavaScript onbeforeunload event of the window object through which I could popup the message when the user tries to navigate away from the current page. But my requirement is to only show him the popup when he tries to leave the SharePoint site and not show him the popup when he navigates to any other page in the same site. Please help!

Data information