microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.47k stars 2.44k forks source link

Error while saving bot state to azure blob storage #6570

Closed harishk3491 closed 1 year ago

harishk3491 commented 1 year ago

I am trying to save bot state to azure blob storage using nuget package Microsoft.Bot.Builder.Azure.Blobs version 4.19.2 for .NET. 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 { typeof(PromptOptions), typeof(DialogInstance), typeof(DialogState), }), }

When i check container blob files are generated anyways

anishprasad01 commented 1 year ago

Duplicate of https://github.com/microsoft/botbuilder-dotnet/issues/6590