Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 10:38
    mph
    0

    Umbraco on 2008R2 IIS 7.5 - member login does not work...

    Hi,

    I've succesfully installed Umbraco 4.0.3 on WS 2008R2 and thus on IIS 7.5 with integrated pipeline.

    I do however not seem to be able to login to the site as a member, the login page does correctly validate if the username / password is correct, but only reloads the login page instead of the protected page!

    Does anyone have a working setup on IIS 7.5 ?? Or any insights into what might be wrong?

     

    Best regards,

    Michael

  • Sebastiaan Janssen 4841 posts 14344 karma points MVP admin hq
    Feb 09, 2010 @ 10:56
    Sebastiaan Janssen
    0

    Modify your web.config, this line needs to include the hashed password attribute:

    <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="hashed" />
  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 11:06
    mph
    0

    Hi Sebastiaan!

    Thanks, but that does not seem to be the problem, as the login page correctly displays an error if username / password is incorrect.

    If the login is correct it only reloads the page!

    I have tried to add passwordFormat="hashed" to my web.config, and after changing the users password to make it hashed the problem persists.

     

    Best regards,

    Michael

     

  • Sebastiaan Janssen 4841 posts 14344 karma points MVP admin hq
    Feb 09, 2010 @ 11:16
    Sebastiaan Janssen
    0

    Strange.. in that case, you should have a look in the umbracoLog table or the windows event log to see what kinds of errors or even exceptions are being thrown. Also, my screencast about installing Umbraco on IIS7.5/Integrated pipeline might help, maybe you missed something? 

  • anthony hall 214 posts 506 karma points
    Feb 09, 2010 @ 11:23
    anthony hall
    0

    i had a issue with IIS 7.5 with extensionless urls. So it would work with "logMeIn.aspx" but not "logMeIn".  Not sure if that helps. 

  • Arnold Visser 418 posts 708 karma points c-trib
    Feb 09, 2010 @ 11:26
    Arnold Visser
    1

    UseDirectoryUrls + Login = login not working.

    fix:

    in the umbraco web.config change:

    <modules>

    to:

    <modules runAllManagedModulesForAllRequests="true">

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 11:37
    mph
    0

    Yes indeed...

    Nice screencast :)

    There are no errors in the Windows event log, and in the umbracoLog table it shows that the it's opening the correct node - but it only reloads the login page.

    Do you have a working website on IIS 7.5 with member protected pages using the built in control?

     

    /Michael

  • Sebastiaan Janssen 4841 posts 14344 karma points MVP admin hq
    Feb 09, 2010 @ 11:43
    Sebastiaan Janssen
    0

    I'm sorry, I misread! Thought you were trying to login to the backend.. never mind, try Arnold's solution, that sounds good! :-)

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 11:52
    mph
    0

    I tried to add <modules runAllManagedModulesForAllRequests="true">, but that didn't change anything...

     

    /Michael

  • Arnold Visser 418 posts 708 karma points c-trib
    Feb 09, 2010 @ 11:56
    Arnold Visser
    0

    you do use directory urls?

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 12:05
    mph
    0

    I'm not really sure, as I've only taken over the site to do the backend install on IIS 7.5 (I didn't code it...).

    umbLoginMembership is being used as a usercontrol and being called by a macro.

    I've also tried on a fresh install of 4.0.3 with NO usercontrols / macros. I just protected a page and made a login template see below, again only a blink and the page reloaded. But it does correctly parse if the username / password is correct, so that part works!

    On the fresh install of 4.0.3 I also tried to add <modules runAllManagedModulesForAllRequests="true">, but here the problem also persists...

    /Michael

     

  • Arnold Visser 418 posts 708 karma points c-trib
    Feb 09, 2010 @ 12:19
    Arnold Visser
    0

    VERY basic working example to login a member:

    <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            <asp:Login ID="Login1" runat="server">
                <LayoutTemplate>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" />
                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ValidationGroup="ctl00$ctl00$Login1" Display="Dynamic" />
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" />
                    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ValidationGroup="ctl00$ctl00$Login1" Display="Dynamic" />
                    <asp:CheckBox CssClass="rememberme" ID="RememberMe" runat="server" />
                    <span class="error"><asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal></span>
                    <asp:Button ID="LoginButton" runat="server" CommandName="Login" ValidationGroup="ctl00$ctl00$Login1" />                 
                   </LayoutTemplate>
            </asp:Login>
        </AnonymousTemplate>
        <LoggedInTemplate>
            <asp:Button ID="LogoutButton" runat="server" onclick="LogoutButton_Click" />
        </LoggedInTemplate>
    </asp:LoginView>

    and:

    private int _redirectNodeID = -1;
    public int RedirectURL
    {
      get { return _redirectNodeID; }
      set { _redirectNodeID = value; }
    }
    
    protected void LoginButton_Click(object sender, EventArgs e)
    {
      Response.Redirect(umbraco.library.NiceUrl(RedirectURL));
    }
    

    You can use macro properties to fill the RedirectURL :)

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 12:31
    mph
    0

    Hi Arnold!

    Thank you very much, I suspect the top code is the template, and the bottom code is the macro...

    Could you provide a few directions on how to implement your code?

    (I'm primarily a server admin kind of guy, so Umbraco is just one app. among many, and my knowledge is kind of limited..)

    /Michael

  • Arnold Visser 418 posts 708 karma points c-trib
    Feb 09, 2010 @ 12:37
    Arnold Visser
    0

    Oh I see :)

    The top part is the content in de .ascx file

    The bottom part is for the codebehind (.ascx.cs) part in Visual Studio.

    Once you have the module (.ascx file) an de .dll file. Place the .dll in the dll folder and the .ascx in the usercontrols folder (you can create subdirs there).

    at the "or .NET User Control" option you select the ascx file you uploaded. Then you click the "browse properties" button. It will give you the "RedirectURL" property as parameter. Then at the "parameter" tab change the "type" to "contentpicker".

    If you add the module somewhere it will ask you click the node to redirect to!

     

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 13:33
    mph
    0

    Hmm, as I understand, it should be possible to login directly via asp.net on a page/template, and not have to create a usercontrol...

    http://www.bayshield.com/2010/1/9/using-the-aspnet-login-control-in-umbraco

    I'll try that approach first, instead of having to create custom dll files.

     

    /Michael

  • Arnold Visser 418 posts 708 karma points c-trib
    Feb 09, 2010 @ 13:54
    Arnold Visser
    0

    Well that's a great solution, but you needed a redirect didn't you?

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 13:59
    mph
    0

    Well that didn't work either...

    On a clean install of 4.0.3 on 2008R2 IIS 7.5, .net 3.5 and integrated pipeline I just cannot login to member protected pages using standard Umbraco

    UmbracoMembershipProvider.

    I used the guide here: www.bayshield.com/.../using-the-aspnet-login-control-in-umbraco

    Is anyone able to use the standard Umbraco UmbracoMembershipProvider to login to member protected pages in a similar setup?

     

    /Michael

  • mph 44 posts 78 karma points
    Feb 09, 2010 @ 14:10
    mph
    0

    Hi Arnold!

    You are absolutely correct, but for test purposes I tried the more simple solution - it did however not work on IIS 7.5.

    Then I tried to test it on IIS 6.0, and here it worked!!

    If you have a similar setup as me, could I perhaps ask you to try to make this very simple test from www.bayshield.com/.../using-the-aspnet-login-control-in-umbraco ??

    /Michael

  • mph 44 posts 78 karma points
    Feb 10, 2010 @ 14:24
    mph
    0

    After extensive test I've concluded that the UmbracoMembershipProvider does not work on IIS 7.5 with integrated pipeline, I've posted a CodePlex work item at: http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=26172

    /Michael

  • James Hildeman 92 posts 88 karma points
    Jun 23, 2011 @ 22:16
    James Hildeman
    0

    Has anyone found a workaround to this issue because I'm running into the same thing porting and umbraco 4.0.2.1 site from IIS6 to IIS7.5? 

    I have a pretty similar situation: UseDirectoryUrls=true.  Classic pipeline.  No protected pages in play.  I added the runAllModulesForAllRequests=true configuration and recycled the app pool with no change in the behavior.  I can hit http://mysite.com/support.aspx but if I try to hit http://mysite.com/support it fails with the error:

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    Can anyone suggest ideas?

    Can anyone post a screenshot of their "Handler Mappings" for comparison?

  • Rasmus Lynggaard 109 posts 296 karma points
    Sep 11, 2012 @ 11:30
    Rasmus Lynggaard
    0

    If anybody is still having this issue, I would just like to give my 10cents.

    On IIS 7.5 .NET framework 3.5 running Umbraco 4.0.3

    Set the Application pool to run with Classic pipeline.
    If you've set the property UseDirectoryUrls to true in web.config you need to add a wildcard handler mapping in IIS. Click "Add Wildcard Script Map" (under "Handler Mappings"). Point to the isapi extension (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll or C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) and give it a name.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft