ChatBot not working after Deploying on Azure - Internal server errorMicrosoft Bot Framework - Call from Azure app service to external Web APIPublish bot to AzureAutomating Deployment in Bot Framework (Bot + LUIS+ QnA + Table Storage)Azure Bot Service - “An internal Error occured at the server”Authorization Failed for Deployed ChatbotMy Cortana skill shows InternalServerError after updating my code on AzureAzure BOT Framework Unable to deploy at Azure using continuous deployment (Git hub)Microsoft Bot Framework Stopped working out of nowhereError (502) Bad Gateway: When trying to access chatbot deployed on Azure using WebChat channelInternal server error of node js app after deployment to azureMicrosoft Bot Framework - Adaptive card version not supported in Teams and Skype for Businessazure chatbot not working. after publishing from visual studio(2017)

Heinlein story regarding suspended animation and reading newspapers?

"Fewer errors means better products" or "Fewer errors mean better products"?

Partial Fractions: Why does this shortcut method work?

What's the proper way of indicating that a car has reached its destination during a dialogue?

Accurately recalling the key - can everyone do it?

Need help identifying how to open this bolt/screw

Reasons for using monsters as bioweapons

The grades of the students in a class

Overprovisioning SSD on ubuntu. How? Ubuntu 19.04 Samsung SSD 860

What is the difference between 2/4 and 4/4 when it comes the accented beats?

Has J.J.Jameson ever found out that Peter Parker is Spider-Man?

How to power down external drive safely

Declaring a visitor to the UK as my "girlfriend" - effect on getting a Visitor visa?

Export economy of Mars

What is realistic quality of computer blueprints quickly backed up before apocalypse and their impact on future design?

Were there any unmanned expeditions to the moon that returned to Earth prior to Apollo?

In Haskell, when using the XStrict language extension, is if short-circuiting?

When did J.K. Rowling decide to make Ron and Hermione a couple?

Protect a 6 inch air hose from physical damage

HackerRank Implement Queue using two stacks Solution

Is verification of a blockchain computationally cheaper than recreating it?

How do people drown while wearing a life jacket?

Applying for mortgage when living together but only one will be on the mortgage

Feedback diagram



ChatBot not working after Deploying on Azure - Internal server error


Microsoft Bot Framework - Call from Azure app service to external Web APIPublish bot to AzureAutomating Deployment in Bot Framework (Bot + LUIS+ QnA + Table Storage)Azure Bot Service - “An internal Error occured at the server”Authorization Failed for Deployed ChatbotMy Cortana skill shows InternalServerError after updating my code on AzureAzure BOT Framework Unable to deploy at Azure using continuous deployment (Git hub)Microsoft Bot Framework Stopped working out of nowhereError (502) Bad Gateway: When trying to access chatbot deployed on Azure using WebChat channelInternal server error of node js app after deployment to azureMicrosoft Bot Framework - Adaptive card version not supported in Teams and Skype for Businessazure chatbot not working. after publishing from visual studio(2017)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.



However when I deploy the bot on Azure and test it on Web chat it gives the following error:




There was an error sending this message to your bot: HTTP status code InternalServerError




This is how my web.config looks like:



 <configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>


I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.



I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.



The application Insight shows the following exception:




POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext




The developers tool console shows this when I interact with the bot:



https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)


if you paste the above link in a browser this is what you will get:




"error":
"code": "BadArgument",
"message": "Missing token or secret"




I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?



A link to github repo of the code:here










share|improve this question


























  • Have you checked it works properly in Emulator (in localhost)?

    – Nilay
    Mar 27 at 4:29











  • Yes. I mentioned it in my question. Only after deploying it on azure it stops working

    – hkhan
    Mar 27 at 5:29











  • Can you post more of your StackTrace?

    – JJ_Wailes
    Mar 27 at 20:59

















0















I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.



However when I deploy the bot on Azure and test it on Web chat it gives the following error:




There was an error sending this message to your bot: HTTP status code InternalServerError




This is how my web.config looks like:



 <configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>


I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.



I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.



The application Insight shows the following exception:




POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext




The developers tool console shows this when I interact with the bot:



https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)


if you paste the above link in a browser this is what you will get:




"error":
"code": "BadArgument",
"message": "Missing token or secret"




I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?



A link to github repo of the code:here










share|improve this question


























  • Have you checked it works properly in Emulator (in localhost)?

    – Nilay
    Mar 27 at 4:29











  • Yes. I mentioned it in my question. Only after deploying it on azure it stops working

    – hkhan
    Mar 27 at 5:29











  • Can you post more of your StackTrace?

    – JJ_Wailes
    Mar 27 at 20:59













0












0








0








I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.



However when I deploy the bot on Azure and test it on Web chat it gives the following error:




There was an error sending this message to your bot: HTTP status code InternalServerError




This is how my web.config looks like:



 <configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>


I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.



I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.



The application Insight shows the following exception:




POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext




The developers tool console shows this when I interact with the bot:



https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)


if you paste the above link in a browser this is what you will get:




"error":
"code": "BadArgument",
"message": "Missing token or secret"




I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?



A link to github repo of the code:here










share|improve this question
















I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.



However when I deploy the bot on Azure and test it on Web chat it gives the following error:




There was an error sending this message to your bot: HTTP status code InternalServerError




This is how my web.config looks like:



 <configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>


I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.



I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.



The application Insight shows the following exception:




POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext




The developers tool console shows this when I interact with the bot:



https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)


if you paste the above link in a browser this is what you will get:




"error":
"code": "BadArgument",
"message": "Missing token or secret"




I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?



A link to github repo of the code:here







azure botframework luis






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 2 at 1:22









Sebastian Zolg

7324 silver badges20 bronze badges




7324 silver badges20 bronze badges










asked Mar 27 at 0:29









hkhanhkhan

4821 gold badge11 silver badges33 bronze badges




4821 gold badge11 silver badges33 bronze badges















  • Have you checked it works properly in Emulator (in localhost)?

    – Nilay
    Mar 27 at 4:29











  • Yes. I mentioned it in my question. Only after deploying it on azure it stops working

    – hkhan
    Mar 27 at 5:29











  • Can you post more of your StackTrace?

    – JJ_Wailes
    Mar 27 at 20:59

















  • Have you checked it works properly in Emulator (in localhost)?

    – Nilay
    Mar 27 at 4:29











  • Yes. I mentioned it in my question. Only after deploying it on azure it stops working

    – hkhan
    Mar 27 at 5:29











  • Can you post more of your StackTrace?

    – JJ_Wailes
    Mar 27 at 20:59
















Have you checked it works properly in Emulator (in localhost)?

– Nilay
Mar 27 at 4:29





Have you checked it works properly in Emulator (in localhost)?

– Nilay
Mar 27 at 4:29













Yes. I mentioned it in my question. Only after deploying it on azure it stops working

– hkhan
Mar 27 at 5:29





Yes. I mentioned it in my question. Only after deploying it on azure it stops working

– hkhan
Mar 27 at 5:29













Can you post more of your StackTrace?

– JJ_Wailes
Mar 27 at 20:59





Can you post more of your StackTrace?

– JJ_Wailes
Mar 27 at 20:59












1 Answer
1






active

oldest

votes


















1














Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.



To make your sample work, simply add the following lines to your Global.asax.csfile.



protected void Application_Start()

RegisterBotDependencies();

GlobalConfiguration.Configure(WebApiConfig.Register);

var store = new InMemoryDataStore();

Conversation.UpdateContainer(
builder =>

builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();


);



Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.



I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.



Summary



Taken from above blog post.




We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.







share|improve this answer

























  • I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

    – hkhan
    Apr 1 at 17:43











  • I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

    – Sebastian Zolg
    Apr 1 at 17:45











  • I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

    – hkhan
    Apr 1 at 17:48












  • Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

    – Sebastian Zolg
    Apr 1 at 17:50






  • 1





    I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

    – Sebastian Zolg
    Apr 1 at 20:49











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368101%2fchatbot-not-working-after-deploying-on-azure-internal-server-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.



To make your sample work, simply add the following lines to your Global.asax.csfile.



protected void Application_Start()

RegisterBotDependencies();

GlobalConfiguration.Configure(WebApiConfig.Register);

var store = new InMemoryDataStore();

Conversation.UpdateContainer(
builder =>

builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();


);



Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.



I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.



Summary



Taken from above blog post.




We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.







share|improve this answer

























  • I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

    – hkhan
    Apr 1 at 17:43











  • I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

    – Sebastian Zolg
    Apr 1 at 17:45











  • I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

    – hkhan
    Apr 1 at 17:48












  • Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

    – Sebastian Zolg
    Apr 1 at 17:50






  • 1





    I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

    – Sebastian Zolg
    Apr 1 at 20:49
















1














Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.



To make your sample work, simply add the following lines to your Global.asax.csfile.



protected void Application_Start()

RegisterBotDependencies();

GlobalConfiguration.Configure(WebApiConfig.Register);

var store = new InMemoryDataStore();

Conversation.UpdateContainer(
builder =>

builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();


);



Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.



I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.



Summary



Taken from above blog post.




We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.







share|improve this answer

























  • I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

    – hkhan
    Apr 1 at 17:43











  • I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

    – Sebastian Zolg
    Apr 1 at 17:45











  • I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

    – hkhan
    Apr 1 at 17:48












  • Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

    – Sebastian Zolg
    Apr 1 at 17:50






  • 1





    I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

    – Sebastian Zolg
    Apr 1 at 20:49














1












1








1







Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.



To make your sample work, simply add the following lines to your Global.asax.csfile.



protected void Application_Start()

RegisterBotDependencies();

GlobalConfiguration.Configure(WebApiConfig.Register);

var store = new InMemoryDataStore();

Conversation.UpdateContainer(
builder =>

builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();


);



Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.



I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.



Summary



Taken from above blog post.




We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.







share|improve this answer













Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.



To make your sample work, simply add the following lines to your Global.asax.csfile.



protected void Application_Start()

RegisterBotDependencies();

GlobalConfiguration.Configure(WebApiConfig.Register);

var store = new InMemoryDataStore();

Conversation.UpdateContainer(
builder =>

builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();

builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();


);



Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.



I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.



Summary



Taken from above blog post.




We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.








share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 1 at 17:11









Sebastian ZolgSebastian Zolg

7324 silver badges20 bronze badges




7324 silver badges20 bronze badges















  • I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

    – hkhan
    Apr 1 at 17:43











  • I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

    – Sebastian Zolg
    Apr 1 at 17:45











  • I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

    – hkhan
    Apr 1 at 17:48












  • Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

    – Sebastian Zolg
    Apr 1 at 17:50






  • 1





    I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

    – Sebastian Zolg
    Apr 1 at 20:49


















  • I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

    – hkhan
    Apr 1 at 17:43











  • I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

    – Sebastian Zolg
    Apr 1 at 17:45











  • I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

    – hkhan
    Apr 1 at 17:48












  • Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

    – Sebastian Zolg
    Apr 1 at 17:50






  • 1





    I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

    – Sebastian Zolg
    Apr 1 at 20:49

















I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

– hkhan
Apr 1 at 17:43





I will check this out! how did you deploy? I mean i am thinking of creating a new bot using SDK v3...and then publishing it from VS on that bot

– hkhan
Apr 1 at 17:43













I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

– Sebastian Zolg
Apr 1 at 17:45





I‘ve deployed using web publish directly out of visual studio to the bot instance. Let me know if you need more advice.

– Sebastian Zolg
Apr 1 at 17:45













I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

– hkhan
Apr 1 at 17:48






I am getting "The name azuremodel does not exist in current context" at line builder => { builder.Register(c => store) .Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore) .AsSelf() .SingleInstance();

– hkhan
Apr 1 at 17:48














Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

– Sebastian Zolg
Apr 1 at 17:50





Sorry, forgot to mention that you have to add Microsoft.Bot.Builder.Azure nuget package! Use the latest 3.x Version!

– Sebastian Zolg
Apr 1 at 17:50




1




1





I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

– Sebastian Zolg
Apr 1 at 20:49






I've send you a PR. github.com/hshahbaz/ChatBotwithLuis/pull/1 Please have a look. Note that I removed parts of your code I'm not 100% sure you need it but I think it contained overlapping configurations for container registration causing your code to crash. Essentially you had multiple issues in your code. The missing bot state was just one. Now, when deploying directly out of this branch to azure, all looks fine: imgur.com/a/GAPClI1. Would you mind accepting my answer?

– Sebastian Zolg
Apr 1 at 20:49









Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368101%2fchatbot-not-working-after-deploying-on-azure-internal-server-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현