I created custom login page for FBA access (SP 2010). In related custom code i inherit Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage class.
Problem: I would like to login in sharepoint with my "hardcoded" user (e.g. "i:0#.w|domainxxx\userxxx")(that is also my win account) but when I call "FormsAuthentication.RedirectFromLoginPage (hardcoded_user,false)" i got error: "System.NullReferenceException: Object reference not set to an instance of an object". Why I can't be redirected to SP ?!?
Do I need to create some SP token, or what. As it seems to me SP can't redirect to my return url for some reason but I'm not sure is that problem or something else. Please any suggestion!!!
------UPDATE ------- I need to handle on login page two kind of possible users. Intranet (AD) and web users which are already authenticated on some custom SSO which if user is authenticated make request to my SP site with appropriate token. If custom token exist I need to create mappings to SP user (by email for examle)based on token data and login that user to SP otherwise i need to create new user/user profile from code based on data from token.
Does somebody have some link or concrete info which can be useful to me. ???