0

Something is really weird happening on my development setup. I am developing for IOS but using react-native but something is happening which is weird.

If I boot the app in my device, and try to fetch the localhost (192.168.10.180) in my computer in nodejs works fine however in dotnet gets a timed out error

I try to simplify the most the servers and even tried these two configurations:

const express = require("express");

var app = express();

app.post("/", (req,res) => res.send("Received"))

app.listen(5056, => console.log("server is running))

on .net

var builder = WebApplication.CreateBuilder(args);

var app = builder.Build();

app.UseCors(options => options.SetIsOriginAllowed(x => _ = true).AllowAnyMethod().AllowAnyHeader().AllowCredentials());

app.MapPost("/", async () =>
{
    return Results.Ok("Hello");

});

app.Run();

while changing of course the launchSettings.json to bind

"applicationUrl": "https://0.0.0.0:7108;http://0.0.0.0:5056",

Long story short: Nodejs works fine, .Net does not work and gets the timed out (505) error. I think there is a step of the .net I am forgetting but cannot find it on google or even chatGPT. Anyone has a tip?

thelittlemaster
  • 157
  • 1
  • 8
  • Not an expert in react native - is there any chance it forces a specific HTTP version (the 3rd one) to be used? – Guru Stron Sep 01 '23 at 06:13
  • @GuruStron That would have implications and not allow to connect to NodeJs. I am trying to get a hold of an android device to see if it is just from IOS, but this gets stranger and stranger day by day. – thelittlemaster Sep 01 '23 at 07:12

0 Answers0