MOSS 2007 : Problem with Forms Based User Administration Feature Release Beta 1.0

Topics: Developer Forum
Feb 7, 2007 at 9:10 PM
Hi,



I found on internet your Forms Based User Administration Feature Release Beta 1.0,

I tried to install it how it was describe in FormsAuthenticationFeature.doc.

i use Sql Server 2005 as database.

I faced to a problem when I tried to create a new user using asp.net web administration tool.

I checked the Membership provider and the connection string and every thing is fine. ( I tested the connection in the provider section in the asp.net web administration tool )



The thing is : I have noticed the problem occurs when you set enablePasswordRetrieval to true so paswordFormat to Encrypted in the membership section.



the error message sent whenver you want to create a new user is :



The following message may help in diagnosing the problem: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)





But if you set enablePasswordRetrieval to false so paswordFormat to Hashed. it works : I can create my user.



Have you got any idea of what it may cause that ?



Thanks in advance for your help.





Arioule.



Feb 8, 2007 at 6:23 AM
Hi Arioule,

Thank you for pointing this out, took me a while to get to the bottom of it.
So basically the problem is to do with the password being set as encrypted. In order to retrieve an encrypted password the application needs to know the machinekey details. This is a setting that you can add in your web.config and it looks something like: <machineKey validationKey="026C09E030769F3812EBEF23B292B989A2B8297E9B8C3898" decryptionKey="9BF2A6373CB926D8E84E6762F0F0DA0ED004E6DE01A43DFB" validation="SHA1" />.
Dont use mine one, you can find the right machinekey in your web applications web.config (by default at C:\Inetpub\wwwroot\wss\VirtualDirectories\PixelFactory80\web.config).
So if you add this into your web.config (inside the <system.web> tag), you should be able to create users fine with an encrypted password.

The other option is to set enablePasswordRetrieval to 'false' or change passwordFormat to 'Clear' while you add the initial user.
Dont change the passwordFormat to hashed, as you won't be able to change that users password easily.
After the initial user is added passwordFormat should be 'Encrypted' and enablePasswordRetrieval should be 'true'.

We plan to create a settings page where you can edit all this stuff from a UI at some stage.
We also hope to streamline the process of creating the user datatbase, adding the provider settings and creating the initial user (probably with an MSI).
In the meantime I will update the Setup & Installation document.

Hope this helps
Zac



Feb 9, 2007 at 12:14 PM
Hi Zac,

Thanks a lot for your help, everything is working fine except the mail is not sending when someone creates a new account. the smtp setting is definitly the right one, so I dont know why. Although Sharepoint use exactely the same configuration and it works. If y
Thanks again,

Arioule.
Feb 9, 2007 at 5:25 PM
Edited Feb 9, 2007 at 5:27 PM
Hi,

I have my MOSS 2007 set up according to Andrew Connel's article at http://andrewconnell.com/blog/archive/2006/10/21/4953.aspx .

Your software is installed fine and I just want to see if the self-registration mechnism is working before I create admin subsite, so I just go and try "Register" link when I login to the website. When "create user" button is clicked, it failed and complained "file not found" although the new user did get created in my sql membership table and I can check that new user name via "site setting". What went wrong? What file is missing? Do I need to create the subsite to make it work?

Please help!

Regards,
Reggie
Feb 10, 2007 at 10:41 PM
Edited Feb 10, 2007 at 10:46 PM
Hey Zac,

I was able to setup FBA based on Andrew Connel's article at http://andrewconnell.com/blog/archive/2006/10/21/4953.aspx. Once FBA was confirmed to be working, I was able to Install and Deploy the solution. However, when I go to either my Internet or Extranet, neither have the option to activate. Do you know what would be causing this?

Pirooz
Feb 11, 2007 at 5:27 AM

arioule wrote:
Hi Zac,

Thanks a lot for your help, everything is working fine except the mail is not sending when someone creates a new account. the smtp setting is definitly the right one, so I dont know why. Although Sharepoint use exactely the same configuration and it works. If y
Thanks again,

Arioule.


Hi Ariole,
That is strange. Just to clairfy, you've edited the mail settings in the web.config at 'C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\UserAdmin'?
Do you get an error message or does the email just not turn up? Can you see anything in the logs?
Zac
Feb 11, 2007 at 7:30 AM

reggie wrote:
Hi,

I have my MOSS 2007 set up according to Andrew Connel's article at http://andrewconnell.com/blog/archive/2006/10/21/4953.aspx .

Your software is installed fine and I just want to see if the self-registration mechnism is working before I create admin subsite, so I just go and try "Register" link when I login to the website. When "create user" button is clicked, it failed and complained "file not found" although the new user did get created in my sql membership table and I can check that new user name via "site setting". What went wrong? What file is missing? Do I need to create the subsite to make it work?

Please help!

Regards,
Reggie


Hi Reggie,
It looks like the application can't find your web.config file. It needs to look at that file to find what provider name you are using. If you have followed Andrew Connel's article I am assuming that your internet zone web app is called internet. So the web.config file should be at something like 'C:\Inetpub\wwwroot\wss\VirtualDirectories\internet80\web.config'. Can you confirm this?
Thanks
Zac
Feb 11, 2007 at 7:35 AM
Edited Feb 11, 2007 at 7:36 AM

pjavan wrote:
Hey Zac,

I was able to setup FBA based on Andrew Connel's article at http://andrewconnell.com/blog/archive/2006/10/21/4953.aspx. Once FBA was confirmed to be working, I was able to Install and Deploy the solution. However, when I go to either my Internet or Extranet, neither have the option to activate. Do you know what would be causing this?

Pirooz


Hi Pirooz,
Can you please check that:
1/ you have deployed the solution to the extranet web application (check this in central admin)
2/ you are looking for the feature at the top level of your site collection. So you should be looking for 'Site Collection Features' in the 'Site Collection Administration' list.
Thanks
Zac
Feb 11, 2007 at 10:13 PM

reggie wrote:

reggie wrote:
Hi,

I have my MOSS 2007 set up according to Andrew Connel's article at http://andrewconnell.com/blog/archive/2006/10/21/4953.aspx .

Your software is installed fine and I just want to see if the self-registration mechnism is working before I create admin subsite, so I just go and try "Register" link when I login to the website. When "create user" button is clicked, it failed and complained "file not found" although the new user did get created in my sql membership table and I can check that new user name via "site setting". What went wrong? What file is missing? Do I need to create the subsite to make it work?

Please help!

Regards,
Reggie


Hi Reggie,
It looks like the application can't find your web.config file. It needs to look at that file to find what provider name you are using. If you have followed Andrew Connel's article I am assuming that your internet zone web app is called internet. So the web.config file should be at something like 'C:\Inetpub\wwwroot\wss\VirtualDirectories\internet80\web.config'. Can you confirm this?
Thanks
Zac


Hi Zac,

Thank you for the response. I am using my own server URL to name the folder, and I do have web.config file located in both

'C:\Inetpub\wwwroot\wss\VirtualDirectories\www.magnetar.net80\web.config' for internet and
'C:\Inetpub\wwwroot\wss\VirtualDirectories\extranet.magnetar.net80\web.config' for extranet AD users.

The deploment and activation seemed fine, and the form does show the new "registration" link and the user doe get created in the SQL membership table. It is just not registered the new member to the site collection. Is there any way to find out what is the missing file that it complained?

The internet site is available for public at http://www.magnetar.net/sites/awaw or http://awaw.magnetar.net

Reggie

Feb 12, 2007 at 12:04 AM
Edited Feb 12, 2007 at 12:06 AM
Hi Zac,

I just checked the solution properties of customauthenticationsolution.wsp under Operation|Solution Management, it is deployed to http://extranet.magnetar.net/. This URL is created for AD users. The internet users that needs to access the solution should come in to the site via http://www.magnetar.net Is this causing the problem? Should I retract the solution?

My understanding is the URL http://extranet.magnetar.net is associated to the MOSS web application I created, but the solution should work for the internet zone URL http://www.magnetar.net.

Reggie
Feb 12, 2007 at 8:22 AM
Hi reggie,
No that seems ok. Your understanding is correct. In the end you have one web application with an internet zone extension. So when it says your solution is deployed to 'http://extranet.magnetar.net/' it is referring to your web application as a whole.
As for your problem I have not been able to reproduce it yet. Will let you know when I make some progress.
Zac
Feb 13, 2007 at 8:21 AM
Hi Zac,

I tried to add User Administration to the admin sub site, and it complains

Unable to add selected web parts.

User Administation: The site http://extranet.magnetar.net?PageView=Sharedcould not be found in the Web application SPWebApplication Name=Extranet - 80 Parent=SPWebService.

Do you have any idea?

Regards,
Reggie
Feb 14, 2007 at 7:20 AM
Edited Feb 14, 2007 at 7:24 AM
Hi Zac,
I have successfully added the Administration panel to my site by following the article provided. Site Admins can add the users and every thing is working fine.But the site login page do not contain the register/forgot password! links on it(as described in the article)...
Do you have any idea?

Regards,
Usman Ali
Apr 10, 2007 at 3:41 PM
I am having an issue when I try and Activate the Custom User Administration in the Site Collection Features. When I click the Activate Button I keep getting a http 403 error that I don't have rights to view the page. I am currently logged in with an account that is part of the Farm administrators group and also is a Site Administrator. I have tried to do this activation from a remote machine as well as while logged into the Web Front End Server as a local admin as the same account has those rights as well.
Apr 10, 2007 at 5:31 PM
I am having the same issue


sennister wrote:
I am having an issue when I try and Activate the Custom User Administration in the Site Collection Features. When I click the Activate Button I keep getting a http 403 error that I don't have rights to view the page. I am currently logged in with an account that is part of the Farm administrators group and also is a Site Administrator. I have tried to do this activation from a remote machine as well as while logged into the Web Front End Server as a local admin as the same account has those rights as well.