3

Is it possible to authenticate a MembershipUser without a password. I have gues user accounts and whihc have temporary passwords, however i do not required these users to actually login. I want to automatically authenticate them back on their userid.

Can this be done?

FormsAuthentication.SetAuthCookie(publicuser.UserName, false); 

doesn't seem to actually authenticate them againsts the memebrship provider.

Eranga
  • 32,181
  • 5
  • 97
  • 96
Nugs
  • 5,503
  • 7
  • 36
  • 57

1 Answers1

1

You can override the ValidateUser defined in System.ServiceModel.DomainServices.Server.ApplicationServices:

protected override bool ValidateUser(string userName, string password)

Then you can check

if ( IsAGuestAccount( userName ) ) return true;

DanTheMan
  • 3,277
  • 2
  • 21
  • 40