Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Network Subsystem is down in Xamarin

Network Subsystem is down in Xamarin

Scheduled Pinned Locked Moved The Lounge
jsonmobilesysadmindebugginghelp
4 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Luis M Rojas
    wrote on last edited by
    #1

    This is my code, i am using XAMARIN FORM. I can conect to the API using GET, the API is running, but when i try to do a POST to call the postTransacciones, i got the following error: NetWork Subsystem is down.

    var data = new[]
    {
    new KeyValuePair("fechaGasto", Fecha),
    new KeyValuePair("tipogasto", TipoGastoData),
    new KeyValuePair("RNC", txtRNCSuplidor.ToString()),
    new KeyValuePair("NCF",txNCF.ToString()),
    new KeyValuePair("URL", sUrl),
    new KeyValuePair("Monto",txtMonto.ToString()),
    new KeyValuePair("TipoTransaccion",TipoTransaccion),
    new KeyValuePair("email", EmailUser),
    };

    #if DEBUG
    HttpClientHandler insecureHandler = DependencyService.Get().GetInsecureHandler();
    HttpClient client = new HttpClient(insecureHandler);
    #else
    HttpClient client = new HttpClient();
    #endif

       string url = "https://localhost:7254/api/GetData/postTransacciones";
       var json =JsonConvert.SerializeObject(data);            
       client.BaseAddress = new Uri(url);
       var stringContent = new StringContent(json, Encoding.UTF8,"application/json");
       try
         {
            
          HttpResponseMessage response = await client.PostAsync(url, stringContent);
    

    Thanks in advanced.

    L D R 3 Replies Last reply
    0
    • L Luis M Rojas

      This is my code, i am using XAMARIN FORM. I can conect to the API using GET, the API is running, but when i try to do a POST to call the postTransacciones, i got the following error: NetWork Subsystem is down.

      var data = new[]
      {
      new KeyValuePair("fechaGasto", Fecha),
      new KeyValuePair("tipogasto", TipoGastoData),
      new KeyValuePair("RNC", txtRNCSuplidor.ToString()),
      new KeyValuePair("NCF",txNCF.ToString()),
      new KeyValuePair("URL", sUrl),
      new KeyValuePair("Monto",txtMonto.ToString()),
      new KeyValuePair("TipoTransaccion",TipoTransaccion),
      new KeyValuePair("email", EmailUser),
      };

      #if DEBUG
      HttpClientHandler insecureHandler = DependencyService.Get().GetInsecureHandler();
      HttpClient client = new HttpClient(insecureHandler);
      #else
      HttpClient client = new HttpClient();
      #endif

         string url = "https://localhost:7254/api/GetData/postTransacciones";
         var json =JsonConvert.SerializeObject(data);            
         client.BaseAddress = new Uri(url);
         var stringContent = new StringContent(json, Encoding.UTF8,"application/json");
         try
           {
              
            HttpResponseMessage response = await client.PostAsync(url, stringContent);
      

      Thanks in advanced.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Sort of like: "the power is off".

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      1 Reply Last reply
      0
      • L Luis M Rojas

        This is my code, i am using XAMARIN FORM. I can conect to the API using GET, the API is running, but when i try to do a POST to call the postTransacciones, i got the following error: NetWork Subsystem is down.

        var data = new[]
        {
        new KeyValuePair("fechaGasto", Fecha),
        new KeyValuePair("tipogasto", TipoGastoData),
        new KeyValuePair("RNC", txtRNCSuplidor.ToString()),
        new KeyValuePair("NCF",txNCF.ToString()),
        new KeyValuePair("URL", sUrl),
        new KeyValuePair("Monto",txtMonto.ToString()),
        new KeyValuePair("TipoTransaccion",TipoTransaccion),
        new KeyValuePair("email", EmailUser),
        };

        #if DEBUG
        HttpClientHandler insecureHandler = DependencyService.Get().GetInsecureHandler();
        HttpClient client = new HttpClient(insecureHandler);
        #else
        HttpClient client = new HttpClient();
        #endif

           string url = "https://localhost:7254/api/GetData/postTransacciones";
           var json =JsonConvert.SerializeObject(data);            
           client.BaseAddress = new Uri(url);
           var stringContent = new StringContent(json, Encoding.UTF8,"application/json");
           try
             {
                
              HttpResponseMessage response = await client.PostAsync(url, stringContent);
        

        Thanks in advanced.

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Wrong forum. Read the message at the top and click the link that says "Got a programming question?".

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
        Dave Kreskowiak

        1 Reply Last reply
        0
        • L Luis M Rojas

          This is my code, i am using XAMARIN FORM. I can conect to the API using GET, the API is running, but when i try to do a POST to call the postTransacciones, i got the following error: NetWork Subsystem is down.

          var data = new[]
          {
          new KeyValuePair("fechaGasto", Fecha),
          new KeyValuePair("tipogasto", TipoGastoData),
          new KeyValuePair("RNC", txtRNCSuplidor.ToString()),
          new KeyValuePair("NCF",txNCF.ToString()),
          new KeyValuePair("URL", sUrl),
          new KeyValuePair("Monto",txtMonto.ToString()),
          new KeyValuePair("TipoTransaccion",TipoTransaccion),
          new KeyValuePair("email", EmailUser),
          };

          #if DEBUG
          HttpClientHandler insecureHandler = DependencyService.Get().GetInsecureHandler();
          HttpClient client = new HttpClient(insecureHandler);
          #else
          HttpClient client = new HttpClient();
          #endif

             string url = "https://localhost:7254/api/GetData/postTransacciones";
             var json =JsonConvert.SerializeObject(data);            
             client.BaseAddress = new Uri(url);
             var stringContent = new StringContent(json, Encoding.UTF8,"application/json");
             try
               {
                  
                HttpResponseMessage response = await client.PostAsync(url, stringContent);
          

          Thanks in advanced.

          R Offline
          R Offline
          RedDk
          wrote on last edited by
          #4

          Check the port number of the "Access Point" and see if it's different from "7254".

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups