Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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