Z
Zerops3mo ago
Swag

.NET public access

I hosted my .net app but idk how i can access it through the url
No description
18 Replies
Aleš
Aleš3mo ago
what does it say when you open the url
Swag
SwagOP3mo ago
No description
Aleš
Aleš3mo ago
what does it say in the runtime log
Swag
SwagOP3mo ago
No description
Aleš
Aleš3mo ago
try curl localhost:5000, it could be that your app is not broadcasting on 0.0.0.0, just on localhost
No description
EdwardD
EdwardD3mo ago
I am sure this isn't the case but still worth checking, is the port on the service the same as the port the application is running off?
Aleš
Aleš3mo ago
if that's the case, try changing host to 0.0.0.0 somewhere - https://github.com/zeropsio/recipe-dotnet/blob/main/appsettings.json#L10-L17 yes, log says 5000 and subdomain contains 5000, it will likely be the host
EdwardD
EdwardD3mo ago
Ah alright 🫡
Swag
SwagOP3mo ago
this is the source
Swag
SwagOP3mo ago
GitHub
GitHub - jasserhouimli/testdeploy
Contribute to jasserhouimli/testdeploy development by creating an account on GitHub.
Swag
SwagOP3mo ago
i tried it :(, same issue
Michal Saloň
Michal Saloň3mo ago
I don't work with .NET, but can't this overwrite the value somehow during build: testbackend/Properties/launchSettings.json
Aleš
Aleš3mo ago
or at least it now listens on 0.0.0.0 properly, the app itself still return 404
No description
Jan Saidl
Jan Saidl3mo ago
To listen on both ipv4 and ipv6, the correct solution is: "Url": "http://[::]:5000"
Aleš
Aleš3mo ago
the other problem was that it was internally redirecting to https https://github.com/fxck/testdeploy/commit/41feda20ef24425c3be6d64a3c9d96c6b13d91fc on zerops it runs behind a proxy with ssl termination, so no need for that (or it should be configurable) https://dotnet-1a1e-5000.prg1.zerops.app/weatherforecast now it works
Swag
SwagOP3mo ago
tysm ❤️

Did you find this page helpful?