{"action":"created","issue":{"url":"https://api.github.com/repos/castleproject/Windsor/issues/84","labels_url":"https://api.github.com/repos/castleproject/Windsor/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/castleproject/Windsor/issues/84/comments","events_url":"https://api.github.com/repos/castleproject/Windsor/issues/84/events","html_url":"https://github.com/castleproject/Windsor/issues/84","id":68474533,"number":84,"title":"Windsor WCF integration broken after ASP.NET 4.6 upgrade","user":{"login":"Buthrakaur","id":126757,"avatar_url":"https://avatars.githubusercontent.com/u/126757?v=3","gravatar_id":"","url":"https://api.github.com/users/Buthrakaur","html_url":"https://github.com/Buthrakaur","followers_url":"https://api.github.com/users/Buthrakaur/followers","following_url":"https://api.github.com/users/Buthrakaur/following{/other_user}","gists_url":"https://api.github.com/users/Buthrakaur/gists{/gist_id}","starred_url":"https://api.github.com/users/Buthrakaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Buthrakaur/subscriptions","organizations_url":"https://api.github.com/users/Buthrakaur/orgs","repos_url":"https://api.github.com/users/Buthrakaur/repos","events_url":"https://api.github.com/users/Buthrakaur/events{/privacy}","received_events_url":"https://api.github.com/users/Buthrakaur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-14T19:24:58Z","updated_at":"2015-04-30T11:22:45Z","closed_at":null,"body":"Hello,\r\nI was trying Visual Studio 2015 CTP and got ASP.NET 4.6 upgrade during the VS installation. I use Windsor WCF integration, which seems to get broken due to this upgrade. I'm injecting Castle.Facilities.WcfIntegration.IWcfClientFactory to my services and use this simple extension method to retrieve the WCF client:\r\n```\r\n        public static T GetClient<T>(this IWcfClientFactory factory) where T : class\r\n        {\r\n            var componentName = typeof (T).FullName;\r\n            return factory.GetClient<T>(componentName);\r\n        }\r\n```\r\nThe GetClient method throws this exception after the upgrade:\r\n```\r\nCastle.MicroKernel.ComponentActivator.ComponentActivatorException: WcfClientActivator: could not proxy component XXX ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at System.RuntimeMethodHandle.GetHashCode()\r\n   at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)\r\n   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)\r\n   at System.ServiceModel.Dispatcher.OperationSelectorBehavior.MethodInfoOperationSelector..ctor(ContractDescription description, MessageDirection directionThatRequiresClientOpSelection)\r\n   at System.ServiceModel.Dispatcher.OperationSelectorBehavior.System.ServiceModel.Description.IContractBehavior.ApplyClientBehavior(ContractDescription description, ServiceEndpoint endpoint, ClientRuntime proxy)\r\n   at System.ServiceModel.Description.DispatcherBuilder.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime clientRuntime)\r\n   at System.ServiceModel.Description.DispatcherBuilder.BuildProxyBehavior(ServiceEndpoint serviceEndpoint, BindingParameterCollection& parameters)\r\n   at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint, Boolean useActiveAutoClose)\r\n   at System.ServiceModel.ChannelFactory.CreateFactory()\r\n   at System.ServiceModel.ChannelFactory.OnOpening()\r\n   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)\r\n   at System.ServiceModel.ChannelFactory.EnsureOpened()\r\n   at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)\r\n   at System.ServiceModel.ChannelFactory`1.CreateChannel()\r\n   at Castle.Facilities.WcfIntegration.WcfClientActivator.<>c__DisplayClass6.<GetChannelCreator>b__1()\r\n   at Castle.Facilities.WcfIntegration.WcfChannelHolder.CreateChannel()\r\n   at Castle.Facilities.WcfIntegration.WcfChannelHolder..ctor(ChannelCreator channelCreator, IWcfBurden burden, Nullable`1 closeTimeout)\r\n   at Castle.Facilities.WcfIntegration.WcfClientActivator.Instantiate(CreationContext context)\r\n   --- End of inner exception stack trace ---\r\n   at Castle.Facilities.WcfIntegration.WcfClientActivator.Instantiate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)\r\n   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(String key, Type service, IDictionary arguments, IReleasePolicy policy)\r\n   at Castle.Facilities.WcfIntegration.WcfClientFactorySelector.<>c__DisplayClass2.<SelectComponent>b__1(IKernelInternal k, IReleasePolicy p)\r\n   at Castle.Facilities.TypedFactory.Internal.TypedFactoryInterceptor.Resolve(IInvocation invocation)\r\n   at Castle.Facilities.TypedFactory.Internal.TypedFactoryInterceptor.Intercept(IInvocation invocation)\r\n   at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n   at Castle.Proxies.IWcfClientFactoryProxy.GetClient[T](String name)\r\n```\r\nThere's obviously some breaking change in ASP.NET 4.6 WCF. I already tried to debug the Windsor source code, bud wasn't able to understand the code enough to be able to figure out where the problem is. Did anyone faced the same problem? Any hints what to try to workaround the problem?\r\n\r\nThe same error ocurs after recent Windows 10 Windows Update when ASP.NET 4.6 runtime upgrade was delivered."},"comment":{"url":"https://api.github.com/repos/castleproject/Windsor/issues/comments/97743516","html_url":"https://github.com/castleproject/Windsor/issues/84#issuecomment-97743516","issue_url":"https://api.github.com/repos/castleproject/Windsor/issues/84","id":97743516,"user":{"login":"Buthrakaur","id":126757,"avatar_url":"https://avatars.githubusercontent.com/u/126757?v=3","gravatar_id":"","url":"https://api.github.com/users/Buthrakaur","html_url":"https://github.com/Buthrakaur","followers_url":"https://api.github.com/users/Buthrakaur/followers","following_url":"https://api.github.com/users/Buthrakaur/following{/other_user}","gists_url":"https://api.github.com/users/Buthrakaur/gists{/gist_id}","starred_url":"https://api.github.com/users/Buthrakaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Buthrakaur/subscriptions","organizations_url":"https://api.github.com/users/Buthrakaur/orgs","repos_url":"https://api.github.com/users/Buthrakaur/repos","events_url":"https://api.github.com/users/Buthrakaur/events{/privacy}","received_events_url":"https://api.github.com/users/Buthrakaur/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T11:22:45Z","updated_at":"2015-04-30T11:22:45Z","body":"@kkozmic : I still have it on my todo list, but MS just released .NET 4.6 RC version - I will try it first. They may already fixed this issue."}}