Exception is thrown when enale/disable custom module

Topics: Administration, Core, Troubleshooting
Sep 6, 2013 at 9:07 AM
Hi,

The following exception occurs when I disable/enable any module. Any suggestions would be great.
2013-09-06 10:25:47,033 [7] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Orchard.Environment.State.ShellStateCoordinator.<>c__DisplayClass21.<Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges>b__13(<>f__AnonymousType7`2 entry) in C:\inetpub\wwwroot\Website\src\Orchard\Environment\State\ShellStateCoordinator.cs:line 127
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Environment.State.ShellStateCoordinator.Orchard.Environment.State.IShellStateManagerEventHandler.ApplyChanges() in C:\inetpub\wwwroot\Website\src\Orchard\Environment\State\ShellStateCoordinator.cs:line 126
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\inetpub\wwwroot\Website\src\Orchard\Events\DefaultOrchardEventBus.cs:line 83
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\inetpub\wwwroot\Website\src\Orchard\Events\DefaultOrchardEventBus.cs:line 68
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, IEnumerable& returnValue) in C:\inetpub\wwwroot\Website\src\Orchard\Events\DefaultOrchardEventBus.cs:line 52
Coordinator
Sep 7, 2013 at 5:55 AM
Can you give more details about your configuration?
Sep 9, 2013 at 7:14 AM
Hi Bertrand, I use Orchard 1.6 src and I don't know what was the issue but I rebuild the solution and its working fine now. Thanks