Open eflorespalma opened 6 years ago
Hi @eflorespalma ,
The exception states that there is something wrong with the IoC interface registration.
In our sample we choose to use a static constructor to demonstrate the use.
However, perhaps in your specific case, you may need to verify the correctness of registrations of the interfacess upon each new session or even new request, depeneds on you need and use case.
The exception also says what you can do in your code to do it:
check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
So use your container to verify that each service is registered.
I was using autofac 4.6 version so i have to downgrade to the version you use in the project instrumentation.
I have my bot published in facebook and web and everything work fine. But the problem is when i stop to talk to the bot after 5 hours more or less and i return to talk to the bot again i have this exception The requested service 'BotBuilder.Instrumentation.Interfaces.IBotFrameworkInstrumentation' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. and to fix this i have to delete the conversation on facebook and talk it again and it works, another thing is that problem is just in facebook in the web chat i dont have problem maybe because i m using directline. I have this code in my IoC
This my autofac class to inject things i need
And this is my message controller where i resolve my root controller
This is part of my RootDialog
And here is the instrumentations inheritance.
I hope somebody can help me with this because i cant find the way to make work this without deleting the conversation.