BugNET

Open source issue tracking & project management
Welcome to BugNET Register | Login |

BugNET Forums

 
  Forum  Development  General develop...  Auto-login
Previous Previous
 
Next Next
New Post 9/23/2008 3:53 PM
User is offline pmartinez
5 posts
No Ranking


Re: Auto-login 

Update: I took the client approach to initiate the login process, but actually did all the heavy lifting server-side by creating a customer MembershipProvider class and putting my custom code in there

Client: If "guid" is a variable in the querystring, immediately post the form

Server: MembershipProvider.ValidateUser: read the guid, call my other server, get back the username, and create the Membershipuser object based on that

There's got to be an easier way, though - surely there is some way in Default.aspx.cs to set the UserName and Password field and force a submit so that I can use the default MembershipProvider class. Darned if I could figure it out though.

 
New Post 9/23/2008 9:28 PM
User is offline pmartinez
5 posts
No Ranking


Re: Auto-login 

Answered my own question - there is a much easier way, in case anyone cares. In my scenario the user has already authenticated to the site, and the server-server web service is available only to machines in the DMZ, so I don't really care about the password - I just need to know the user name.

MembershipUser

 

 

 

user = UserIT.GetUser(guidUserName);if (user == null)     UserIT.CreateUser(guidUserName, guidPassword, guidUserName);FormsAuthentication.RedirectFromLoginPage(guidUserName, true);

 
Previous Previous
 
Next Next
  Forum  Development  General develop...  Auto-login

Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.