builder.Services.AddHttpClient("ArticleAPI", client => // Injecten der HttpClientFactory { client.BaseAddress = new Uri(File.ReadAllText("ipaddress.json")+"/api/"); });
builder.Services.AddHttpClient("ArticleAPI", client => // Injecten der HttpClientFactory { client.BaseAddress = new Uri(File.ReadAllText("ipaddress.json")+"/api/"); });
Now, if there's
http://localhost:5255
http://localhost:5255
in this file, my application works. If I put in my local IP-Address
http://192.168.178.22:5255
http://192.168.178.22:5255
it doesn't work. HOWEVER; I tried to run the application on another PC. There it's the other way around. Localhost doesn't work but their own local IP address does.