Error When Installing

Hello,

  I am receiving the following when I try to install the web part:

 

PS C:\Users\Administrator\desktop\SharePoint 2010 FBA Pack> ./deploy https://myservername

Solution not installed

Going to add solution
Name                           SolutionId                           Deployed----                           ----------                           --------visigo.sharepoint.formsbase... 956715d5-f34c-4b00-bfb7-8c35d5fa0f62 FalseGoing to install solution to all web applicationsInstall-SPSolution : Admin SVC must be running in order to create deployment timer job.At C:\Users\Administrator\desktop\SharePoint 2010 FBA Pack\Deploy.ps1:50 char:19+ Install-SPSolution <<<<  -identity $solutionName -allwebapplications -GACDeployment    + CategoryInfo          : InvalidData: (Microsoft.Share...InstallSolution:SPCmdletInstallSolution) [Install-SPSolu   tion], SPCmdletException    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletInstallSolution
Waiting for job to finish

Waiting to finish job solution-deployment-visigo.sharepoint.formsbasedauthentication.wsp-0..............................

 

The waiting portion just continues and the web part is never installed.  Could you please assist me?  I think that this web part pack is an awesome idea, I just wish that I could get it to work.

 

Kind Regards,

Gerald

From the error it sounds like the SharePoint Administration or maybe SharePoint Timer service isn't running, so i'd check that first and make sure those are running and then try to deploy again.  Also, make sure that you have the latest version (1.02) - the first release did have a bug where it would wait forever in some circumstances. If you continue to have problems, try a manual deploy:

http://technet.microsoft.com/en-us/library/cc262995.aspx

Thank you!  I thought that I had everything all set, however, it appears as though the SharePoint Administration service was set to manual for some reason.  Everything installed successfully.  Thank you again!

Just a quick question in regards to the password change . . . is it possible to set complexity requirements for password changes?

You can set the complexity in your SQLMembershipProvider web.config entry:

http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx

Thank you.  You are the best!  Do you think that you could possibly tell me what I'm doing wrong in the following instance; I try to set the 

maxInvalidPasswordAttempts="3" and the passwordAttemptWindow="10" . . . . what happens is that the user will incorrectly input their password three times and then they wait 10min, however, the user is not able to login even after waiting 15min or more . . . I have no idea why this is.


Once an account gets locked out an administrator has to manually unlock it, it doesn't reset after so many minutes.  The PasswordAttemptWindow is the window of time in which the max # of password attempts must occur to lock the user out.  You can see more info here:

http://msdn.microsoft.com/en-us/library/system.web.security.membership.passwordattemptwindow(v=vs.80).aspx

That has greatly helped my understanding.  Thank you!

Now, I just don't know how to go about unlocking an account once it has been locked.

Unfortunately we don't have that feature in the FBA Pack yet.  I've always done it right through SQL Server, but I know that's not a good solution.  Add a feature request in the Issue Tracker and i'll consider adding it in a future release.

Thank you.  How would you do it via SQL Server?

I will submit this to the Issue Tracker as you have stated.

For a single user:

update aspnet_membership

set isLockedOut = 0

where userid = 'theuserid'

For all users:

update aspnet_membership

set isLockedOut = 0

Thank you again for your help, however, I am receiving the following error:

 

Msg 207, Level 16, State 1, Line 1

Invalid column name 'theuserIamtryingtounlock'

It sounds like there's an error in the sql you're writing.  Post the full sql you're running and i'll take a look.

Here's a real example of the exact syntax for a single user:

 

update aspnet_membership

set isLockedOut = 0

where userid = '01CB68C4-25D9-4342-B926-A211DBD2BDD9'

 

To get the userid, you have to look it up from the aspnet_users table like this:

select UserId

from aspnet_Users

where UserName = 'ccoulson'

 

Alternatively you can put it all together like so:

update aspnet_membership

set isLockedOut = 0

from aspnet_Membership join aspnet_Users on aspnet_membership.userid = aspnet_users.UserId

where UserName = 'ccoulson'

 

And, probably even easier, I just noticed that the membership database has a built in stored procedure for doing it, so you could just run:

exec aspnet_Membership_UnlockUser '/','ccoulson'

You are awesome.  Can you tell I'm at the end of a project? LOL  It slipped my mind that the user wouldn't be stored as their username but rather a GUID, that was my mistake. 

You have been an incredible amount of help.  Thank you so much.

Do you know the SQL Query that will return a users password from the aspnetdb?  Something similiar to what you posted for unlocking a user's account?

exec aspnet_Membership_UnlockUser '/','ccoulson'

 

Thank You in Advance!

exec aspnet_membership_getpasswordwithformat '/', 'ccoulson',null,null

The password is the first column returned, the password format is the 2nd.  Note that you'll only be able to retrieve the ACTUAL users password if the format is CLEAR (0). If it's hashed (1) or Encrypted (2), the password column will only include the hashed or encrypted version of the password.  You can set the password format used in the web config with the PasswordFormat option on the SqlMembershipProvider.  Note that this will only set the format going forward, and won't allow for the decryption of passwords already hashed or encypted.

Thank you!

 

And to reset the password what would I use? I've tried using the WebPart in the FBA Pack, but it asks a question, "YourDog" and the users have no place to submit the answer originally when their account is created.  Ideally, I just want to set their password to something new, have them login with that new password and then have them change it to something new using the "Change Password" dropdown.   I've tried all sorts of combinations and get nowhere, please help.

gmack523 wrote:

Thank you!

 

And to reset the password what would I use? I've tried using the WebPart in the FBA Pack, but it asks a question, "YourDog" and the users have no place to submit the answer originally when their account is created.  Ideally, I just want to set their password to something new, have them login with that new password and then have them change it to something new using the "Change Password" dropdown.   I've tried all sorts of combinations and get nowhere, please help.

 

  I figured out how to do the following and thought that others may have a similar issue down the road and may be looking for how to remedy the problem.  So here goes -- PasswordSalt is VERY important:

 

PasswordSalt can be found in the 3rd column after running the following query:
exec aspnet_membership_getpasswordwithformat '/', 'UserAccountNeedingPasswordChange',null,null


Reset the password using the following query:
DECLARE @changeDate datetimeset @changeDate = getdate()                                                                                                                                                                                                                                                                                                                                                                   exec aspnet_Membership_setPassword '/','UserAccountNeedingPasswordChange', 'TypeNewPasswordHere','PasswordSalt',@changeDate

Glad to hear that you got the password reset.  

As for the Question/Answer, this is because of the "RequiresQuestionAndAnswer" option on the SQLMembershipProvider.  If it's set to true, the user will be asked for a question and answer when they register with the Membership Request web part. As well, the user will be asked for the answer to the question when recovering their password.

If the value was initially set to false and later changed to true, then the original registered users will not have an answer stored and will not be able to recover their password.

Also, if set to false, there is a "Reset Password" option available in the User Management page.  It's not available when RequiresQuestionAndAnswer = true, as the answer is required by the SQLMembershipProvider to reset the password (and the administrator shouldn't have the answer to the question).

I would probably just leave it set to false, as I don't think it provides much benefit when used with the FBA Pack - as the FBA Pack sends an email to the email address registered to the account - so only the registered user should be able to receive the email with the reset password.