i am trying to save bot framework using C#. I am trying to save bot state to azure blob storage
using nuget package Microsoft.Bot.Builder.Azure.Blobs
version 4.19.2.
What i am doing is in Startup.cs file is
var storage = new BlobsStorage(
"connectionstring",
"containername"
);
var userState = new UserState(storage);
services.AddSingleton(userState);
var conversationState = new ConversationState(storage);
services.AddSingleton(conversationState);
But i am getting following error
System.InvalidOperationException: Unable to find the following types in the ‘AllowedTypes’ collection.
Please provide the ‘AllowedTypesSerializationBinder’ in the custom ‘JsonSerializerSettings’ instance, with the list of types to allow.
Example:
new JsonSerializerSettings
{
SerializationBinder = new AllowedTypesSerializationBinder(
new List<Type>
{
typeof(PromptOptions),
typeof(DialogInstance),
typeof(DialogState),
}),
}
When i check container blob files are generated anyways
2
Answers
You can supply this when you create the BlobsStorage instance:
This issue was patched in v4.19.3.