While refactoring my Service Fabric services I got the following exception over and over again:
Interface id -103369040 is not implemented by object Codit.MyOtherService
The exception was caused when I was running the following code:
During the refactoring I added an additional operation to the IMyService but apparently it’s looking for it in my IMyOtherService implementation. Odd!
During debugging I noticed that the problem was in the configuration of my service that was trying to initiate a call by using the proxy. The “culprit” lies in the following line:
Do you see it? Neither did I because the problem was in the Settings.xml of the service where the configured URI I was using was fabric:/Codit.Demo/MyOtherService instead of fabric:/Codit.Demo/MyService. This caused the runtime to attempt to call a method on a service implementation that didn’t implement IMyService but is an implementation of IMyOtherService instead.
While this seems like a stupid mistake -and it is- it took me a while to notice it. What I once again learned is that the key to success is in your logging – Log enough to know what’s going on but don’t over do it.
In my case it’s a good idea to add an ETW entry to what configured endpoint I’m remoting so I can detect this misconfigured earlier in the future.
Thanks for reading,
Tom.
Subscribe to our RSS feed