Copied to clipboard

Flag this post as spam?

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


  • Tom C 87 posts 222 karma points
    Dec 19, 2016 @ 09:42
    Tom C
    0

    UmbracoIdentity TargetParameterCountException

    Morning everyone, don't know if anyone might be able to help me here, but a couple of days ago my project suddenly and for no apparent reason stopped being able to start on my local machine, and just throws the error below. Tried obvious things, like restarting, removing temp files, but not helping and can't think what else to try. Perhaps somebody else has seen it? Site still works on my production server so can't be too serious :-S thanks for any help

    [TargetParameterCountException: Parameter count mismatch.] System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +12436468 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +54 UmbracoIdentity.ReflectionHelper.CallStaticMethod(Type type, String methodName, Object[] parameters) in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\ReflectionHelper.cs:21 UmbracoIdentity.ExternalLoginStore.CreateTable(Boolean overwrite, Type modelType, SqlCeSyntaxProvider syntaxProvider) in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\ExternalLoginStore.cs:146 UmbracoIdentity.ExternalLoginStore..ctor() in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\ExternalLoginStore.cs:51 UmbracoIdentity.UmbracoMembersUserManager1.Create(IdentityFactoryOptions1 options, IMemberService memberService, IMemberTypeService memberTypeService, IMemberGroupService memberGroupService, IExternalLoginStore externalLoginStore, IdentityEnabledMembersMembershipProvider membershipProvider) in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\UmbracoMembersUserManager.cs:81 UmbracoIdentity.<>cDisplayClass0_01.<ConfigureUserManagerForUmbracoMembers>b__0(IdentityFactoryOptions1 o, IOwinContext c) in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\AppBuilderExtensions.cs:36 Microsoft.AspNet.Identity.Owin.IdentityFactoryProvider1.Create(IdentityFactoryOptions1 options, IOwinContext context) +14 Microsoft.AspNet.Identity.Owin.0.MoveNext() +104

  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 19, 2016 @ 10:37
    Damiaan
    0

    If you look at the stack trace, the externalLoginStore on line 146 and 147 is

    var defFactoryType = Type.GetType("Umbraco.Core.Persistence.DatabaseModelDefinitions.DefinitionFactory,Umbraco.Core", true);
    var tableDefinition = (TableDefinition)defFactoryType.CallStaticMethod("GetTableDefinition", modelType);
    

    On this commit on the core a new parameter was added, making umbraco incompatible with UmbracoIdentity.

    Is it possible you have updated your umbraco?

  • Tom C 87 posts 222 karma points
    Dec 19, 2016 @ 11:07
    Tom C
    0

    Thanks, I guess that must be it then ... yes i did upgrade to 7.5.6 (from 7.5.2) last week. however it did work to start with after upgrade and my production server is running 7.5.6 and that is still working so doesnt make complete sense .. i will have a look at downgrading and see if that fixes it.

  • Tom C 87 posts 222 karma points
    Dec 19, 2016 @ 11:08
    Tom C
    0

    Oh i imagine it doesnt need to call the CreateTable on the production server as it already has one? so hasn't got that exception yet

  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 19, 2016 @ 11:11
    Damiaan
    0

    Yes, that's it. It seems to be when creating tables.

  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 19, 2016 @ 16:28
    Damiaan
    0

    Created an issue on the UmbracoIdentity github repository: https://github.com/Shazwazza/UmbracoIdentity/issues/58

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Dec 19, 2016 @ 23:48
    Shannon Deminick
    0

    The perils of using non public APIs.

    I'll have to get another Identity released, don't have much time at the moment so PRs are welcome. Hopefully can have something sorted by the end of the year.

  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 20, 2016 @ 12:31
    Damiaan
    0

    I have no idea where to get the ISQLSyntaxProvider from to be honest :-)

    Maybe @Tom knows?

  • John Bergman 483 posts 1132 karma points
    Dec 20, 2016 @ 15:48
  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 22, 2016 @ 11:06
    Damiaan
    0

    Tom

    I did a pull request for UmbracoIdentity, don't have time to test it currently. Do you have time to test it?

    https://github.com/Shazwazza/UmbracoIdentity/pull/60

    Kind regard
    Damiaan

  • Tom C 87 posts 222 karma points
    Dec 22, 2016 @ 11:16
    Tom C
    0

    Sure I'll give it a go when I'm home later and let you know.

  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Dec 22, 2016 @ 13:58
    Damiaan
    0

    If you download/fork the project, it might be necessary to upgrade umbraco nugets to be able to build. Tried it on another branch, now builds without issues on that branch.

  • Tom C 87 posts 222 karma points
    Dec 22, 2016 @ 17:47
    Tom C
    0

    Hi Damiaan,

    Sorry Im new to this .. I see you have two active branches,

    feature/useDatabaseSchemaHelper Updated 7 hours ago by WKB\Damiaan.Peeters

    hotfix/issue-58 Updated 7 hours ago by WKB\Damiaan.Peeters

    which one do i need to download? thx

Please Sign in or register to post replies

Write your reply to:

Draft