Botframework emulator ikke å få koblet

stemmer
0

Jeg prøver å bruke bot rammeverk emulator for å koble til min BOT. Det gir feil som

Unntak: Response statuskode indikerer ikke lykkes: 401 (Ingen tilgang). [Filtype 'text / plain']

da jeg så på detaljene i feilmeldingen viser URL som http: // localhost: 31727

men min bot url er http: // localhost: 3979 / api / meldinger

Kan du hjelpe meg å finne problemet her?

Jeg har lagt hele feilmeldingen nedenfor.

skriv

Melding, tidsstempel:: { type 2017-03-08T09: 51: 40.142Z, serviceUrl: http: // localhost: 31727 , Kanal-: emulator, fra : { id: l0352n0fl2ja1ede6, name: Bot}, samtale: { id: 67infihmnjcl68bd7c}, mottaker: { id: default-brukeren}, locale: en-US, text: Unntak: Response statuskode indikerer ikke lykkes. 401 (Ingen tilgang), vedlegg: [{ innholdstype: text / plain, innhold : ved System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () \ r \ n i Microsoft.Bot.Builder.Luis.LuisService.d__3.MoveNext () \ r \ n --- End of stabel spor fra tidligere posisjons hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i system. Runtime.CompilerServices.TaskAwaiter 1.GetResult()\r\n at Microsoft.Bot.Builder.Luis.Extensions.<QueryAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult () \ r \ n ved Microsoft.Bot.Builder.Dialogs.LuisDialog 1.<MessageReceived>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n at Microsoft.Bot.Builder.Dialogs.Internals.DialogTask.ThunkResume1.d__5.MoveNext () \ r \ n --- End of stabel spor fra previou s sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter 1.GetResult()\r\n at Microsoft.Bot.Builder.Internals.Fibers.Wait2.-PollAsync> d__19.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n i System.Runtime.CompilerServices.TaskAwaiter .ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter 1.GetResult()\r\n at Microsoft.Bot.Builder.Internals.Fibers.Frame1.-PollAsync> d__9.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification ( oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter 1.GetResult()\r\n at Microsoft.Bot.Builder.Internals.Fibers.Fiber1.-PollAsync> d__16.MoveNext () \ r \ n --- Slutten av stabelen spor fra forrige sted hvor unntak oppsto --- \ r \ n i System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () \ r \ n ved Microsoft.Bot.Builder.Internals.Fibers.Wait 2.Microsoft.Bot.Builder.Internals.Fibers.IAwaiter<T>.GetResult()\r\n at Microsoft.Bot.Builder.Dialogs.Chain.LoopDialog1.d__3. MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n i System.Runtime .CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n ved Microsoft.Bot.Builder.Dialogs.Internals.DialogTask.ThunkResume 1.<Rest>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult () \ r \ n ved Microsoft.Bot.Builder.Internals.Fibers.Wait 2.<Microsoft-Bot-Builder-Internals-Fibers-IWait<C>-PollAsync>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult () \ r \ n ved Microsoft.Bot.Builder.Internals.Fibers.Frame 1.<Microsoft-Bot-Builder-Internals-Fibers-IFrameLoop<C>-PollAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult () \ r \ n i Microsoft.Bot. Builder.Internals.Fibers.Fiber 1.<Microsoft-Bot-Builder-Internals-Fibers-IFiberLoop<C>-PollAsync>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.DialogTask.d__23.MoveNext () \ r \ n --- End of stabel spor fra foregående sted hvor unntak ble kastet --- \ r \ n i System.Runtime.Comp ilerServices.TaskAwaiter.ThrowForNonSuccess (Oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft. Bot.Builder.Dialogs.Internals.ReactiveDialogTask.d__3.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs .Internals.ScoringEventLoop`1.d__5.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave ) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.Compi lerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask.d__4.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntak oppsto --- \ r \ n i System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask.d__4.MoveNext () \ r \ n --- End of stabel spor fra foregående sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask.d__2.MoveNext () \ r \ n --- End of stabel spor fra forrige sted hvor unntaket var kastet --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.HandleNonSucce ssAndDebuggerNotification (Oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.SerializeByConversation.d__4.MoveNext () \ r \ n --- slutten av stabelen spor fra forrige sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.SetAmbientThreadCulture.d__2.MoveNext () \ r \ n --- End of stabel spor fra foregående sted hvor unntak oppsto --- \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (oppgave oppgave) \ r \ n ved System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (oppgave oppgave) \ r \ n i System.Runtime.CompilerServices.TaskAwaiter.GetResult () \ r \ n i Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUse r.d__5.MoveNext () }], enheter: [], replyToId: fc5lb3ii344hk7hnac, id: jmi06madf5020naii, localTimestamp: 2017-03-08T15: 21: 40 + 05 : 30 } Logg

Publisert på 08/03/2017 klokken 09:57
kilden bruker
På andre språk...                            


3 svar

stemmer
0

Jeg sto overfor lignende problem og løst ved å legge under appSettings i konfigurasjonsfilen:

 <add key="LuisAppId" value="2342342323423423424"/>
 <add key="LuisAPIKey" value="2342343453423423423"/>
 <add key="LuisAPIHostName" value="westeurope.api.cognitive.microsoft.com"/>

PS: Husk å legge ovennevnte innstillinger spesifikke for programmet:>

Svarte 23/03/2018 kl. 00:06
kilden bruker

stemmer
0

Har du prøvd å sette AppID og AppSecret i Emulator? Du kan finne disse verdiene i Web.configfilen i prosjektet.

<appSettings>
   <add key="MicrosoftAppId" value="YourAppId" />
   <add key="MicrosoftAppPassword" value="YourAppPassword" />
</appSettings>
Svarte 05/04/2017 kl. 07:36
kilden bruker

stemmer
0

Min gjetning at konfigurasjonen med bot er OK. Mest sannsynlig, at problemet fører av Microsoft.Bot.Builder.Luis.LuisService (på den vedlagte stack) som du ikke gir den riktige legitimasjonen som er grunnen til at du får 401.

Prøv å implementere en enklere bot (hallo ord) for å bekrefte at tilkoblingen med emulator fungerer.

PS. Du kan kjøre Fiddler å se alle forespørsler og se hvilken som faktisk er mislykket.

Svarte 09/03/2017 kl. 09:38
kilden bruker

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more