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
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.
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.
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.
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.
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.UmbracoMembersUserManager
1.Create(IdentityFactoryOptions
1 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(IdentityFactoryOptions
1 o, IOwinContext c) in X:\Projects\Umbraco\UmbracoIdentity\src\UmbracoIdentity\AppBuilderExtensions.cs:36 Microsoft.AspNet.Identity.Owin.IdentityFactoryProvider1.Create(IdentityFactoryOptions
1 options, IOwinContext context) +14 Microsoft.AspNet.Identity.Owin.0.MoveNext() +104If you look at the stack trace, the externalLoginStore on line 146 and 147 is
On this commit on the core a new parameter was added, making umbraco incompatible with UmbracoIdentity.
Is it possible you have updated your umbraco?
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.
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
Yes, that's it. It seems to be when creating tables.
Created an issue on the UmbracoIdentity github repository: https://github.com/Shazwazza/UmbracoIdentity/issues/58
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.
I have no idea where to get the ISQLSyntaxProvider from to be honest :-)
Maybe @Tom knows?
How about this? https://our.umbraco.org/apidocs/csharp/api/Umbraco.Core.Persistence.SqlSyntax.SqlSyntaxProviders.html
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
Sure I'll give it a go when I'm home later and let you know.
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.
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
is working on a reply...