Botframework-sdk: Emulator doesnt work. An error occurred while sending the request.

Created on 8 Apr 2016  路  4Comments  路  Source: microsoft/botframework-sdk

Sometimes the emulator works. Sometime it doesnt. The error is.

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:3978
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at BotFrameworkEmulator.SessionModel.d__46.MoveNext()

bug

Most helpful comment

@tomlm what do you mean? I can go to 127.0.0.1:3978 on my browser and it works fine. I only get the An error occurred while sending the request when I run the simulator

All 4 comments

This error happens if your web server is not running. Please make sure your server is listening at that port.

@tomlm what do you mean? I can go to 127.0.0.1:3978 on my browser and it works fine. I only get the An error occurred while sending the request when I run the simulator

@tomlm, I have the same problem. Already everything works fine. I got respond from emulator but now I have the same issue of @bluekite2000.

Make sure to pay close attention to the port numbers. Your bot must be running and must be accessible on the URL specified in the Bot Url field in the emulator UI.

Even though the trace is long, the error is very simple -- it's in this line: "No connection could be made because the target machine actively refused it 127.0.0.1:3978"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clearab picture clearab  路  3Comments

kenyeung128 picture kenyeung128  路  3Comments

sebsylvester picture sebsylvester  路  3Comments

RaoVenka picture RaoVenka  路  3Comments

mattlanham picture mattlanham  路  3Comments