Copied to clipboard

Flag this post as spam?

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


  • Yovav Gad 41 posts 62 karma points
    Jul 08, 2010 @ 00:44
    Yovav Gad
    0

    Index was outside the bounds of the array after changing membership provider

    Dear Umbraco,

    I'm trying to change the membership provider to a ASP.NET membership provider,

    it looks like this:

     

    <

     

     

     

    add name="MyMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="Connection_umbraco" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" applicationName="MyApp"/>

      

    Any idea what is d:\TeamCity ?

    or how can I successfully login using the ASP.NET Membership ?

     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.IndexOutOfRangeException: Index was outside the bounds of the array.

    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:

    Server Error in '/' Application.

    Index was outside the bounds of the array.

     

    [IndexOutOfRangeException: Index was outside the bounds of the array.]
       umbraco.cms.presentation._umbraco.Page_Load(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\umbraco.aspx.cs:56
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\businesslogic\BasePages\BasePage.cs:287
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 08, 2010 @ 08:58
    Dirk De Grave
    0

    Hi,

    Have you also set the default membership provider to use? I guess the error is because you've not set your asp.net membership as the default one.

     <!-- Membership Provider -->
        <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <clear />
            <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
            <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
          </providers>
        </membership>

    So, don't forget to set the defaultProvider attribute to your membership provider

    And the path to the error message can be ignored, that's just because the umbraco is built from that path (using teamcity)

     

    Hope this helps.

    Regards,

    /Dirk

  • Yovav Gad 41 posts 62 karma points
    Jul 08, 2010 @ 17:09
    Yovav Gad
    0

    It wasn't the problem - I set the default provider correctly,

    I found out that we also got empty strings and this error showed up regardless...

    (for example the button at the login screen had no text)

    Just installed the latest version 4.5 and give it a try,

     

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft