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?

2
  • Not an expert in react native - is there any chance it forces a specific HTTP version (the 3rd one) to be used? Commented Sep 1, 2023 at 6: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. Commented Sep 1, 2023 at 7:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.