I am developing a project with frontend flutter and backend asp.net core. Once the asp.net project is deployed to IIS I can successfully get a response. I am changing base url and running asp.net project in visual studio. Then I am getting this error.
Response = SocketException: Write failed (OS Error: Connection reset by peer, errno = 104), address = 10.0.2.2, port = 42746
I am using Dio package on flutter. This is network init code.
final baseOptions = BaseOptions(
      contentType: "application/json",
      //baseUrl: "http://192.168.1.111:80",  // IIS
      baseUrl: "http://10.0.2.2:44305",      // Local
    );
    _dio = Dio(baseOptions);
    (_dio?.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
        (HttpClient client) {
      client.badCertificateCallback =
          (X509Certificate cert, String host, int port) => true;
      return client;
    };
This is swagger view when run project on local (visual studio)

