[英]dns and error: Failed to load resource: the server responded with a status of 502 (Bad Gateway)
[英]Azure Bot Returning “Failed to load resource: the server responded with a status of 502 (Bad Gateway)” error
我們已經創建了機器人解決方案並將其發布在Azure中。 在本地工作正常。 在Azure中,我們使用另一個App服務資源來保護Web App機器人。 因此,我們收到“無法加載資源:服務器響應狀態為502(錯誤的網關)”錯誤。
在應用程序服務的“身份驗證/授權”選項卡下,如果我選擇了“允許匿名請求”,則對於“未驗證請求時要采取的措施”下拉列表可以正常工作。 如果我選擇“使用Azure Active Directory登錄”,則bot無法正常工作。
Bot甚至無法在Azure網站本身的WebChat中的Test中工作。
提供憑據后,我們便可以訪問機器人默認頁面。
請讓我知道我缺少的步驟,如果您需要任何其他信息,請告訴我。
連接機器人的代碼。
BotChat.App({
botConnection: botConnection,
user: { id: model.userId, Username: model.LoginUser},
bot: { id: model.botId, name: model.botName },
resize: 'window',
speechOptions: speechOptions,
locale: 'en',
sendTypingIndicator: true
}, document.getElementById('BotChatElement'));
botConnection
.postActivity({
from: user,
name: 'requestWelcomeDialog',
type: 'event',
value: ''
})
.subscribe(function (id) {
console.log('"trigger requestWelcomeDialog" sent');
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.