MemberControls - How To Use?

Mar 23, 2008 at 1:24 PM
Edited Mar 23, 2008 at 1:26 PM
OK... I give up... The book documenting it has been 'promised' since November, but it is still not published. I really needed to implement some login functionality, so I decided to try it blind. If things go good, I may document my process and write the book myself ;)

BUT, here is my experience.

I downloaded the umbracoext source (latest and greatest 15504). I only wanted the member controls right now, so I looked, and there is a nice package there ready for use. I tried to upload it as a package, and it reports success, but IT REALLY FAILS SILENTLY. The macro and xslt get installed, but the three controls under usercontrols/umbracoMemberControls/ don't get installed. I look in the package.xml file, and I think I see the problem.. the path for those three controls are not prefixed by a '/'. I can't find them on the server, so I just unzip the package, correct the package.xml file, rezip, and re-install. Same problem. But if I repeat the same process, but create the directory myself, it works!

Problem #1 - The package extractor does not seem to create directories properly. Maybe this should be crossposted to the main Umbraco codeplex pages...

OK, so now that I have the files where they belong, I create a new Login template, add the MemberLogin macro, give it some text. I then create a content page, using the Login template. I publish.

When I navigate to the page, I get the following error:

===================

Control 'umbLogin2TextBoxUserName' of type 'TextBox' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'umbLogin2TextBoxUserName' of type 'TextBox' must be placed inside a form tag with runat=server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

HttpException (0x80004005): Control 'umbLogin_2_TextBoxUserName' of type 'TextBox' must be placed inside a form tag with runat=server.
System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +2049759
System.Web.UI.WebControls.TextBox.AddAttributesToRender(HtmlTextWriter writer) +49
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +17
System.Web.UI.WebControls.TextBox.Render(HtmlTextWriter writer) +17
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
umbraco.layoutControls.umbracoPageHolder.Render(HtmlTextWriter output) +4
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
umbraco.WebForm1.Render(HtmlTextWriter output) +56
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558

Aug 14, 2008 at 11:22 AM
Just in case anyone has the same Issue, this seems to have fixed it for me:

Put this In your templates for the signin form etc, .

<?ASPNET_FORM>

[sign-in etc macros go in here]

</?ASPNET_FORM>

Also the screencast is here -> http://hartvig.com/screencasts/members.htm
A transcript is in this forum thread ->http://forum.umbraco.org/yaf_postsm24787_Question-about-password-and-membership-to-see-file.aspx