Good day, sorry for my english I will try to explain myself as best as I can. I want to deploy in local network a small web server application I did using Blazor Net 6, I did deploy my application called APP inside a folder callde DEMO in the inetpub on and IIS I using for testing, I copied in the folder all the files and folders from the publish destination folder inside my local development machine. Then inside IIS I did create an applicationpool and I did create a new website and as binding I set up port 4000 as well as set up in the kestrel appsettings too. Associated the website with the applicationpool and installed websocket and all went pretty nicely. I can access my application via browser just using the name of the server and port assigned.
Now is the difficult point, I want to hide the port from the link and possibly I want to just type in the address bar the http://nameofserver/DEMO only.
I did try to read some guides around but I got pretty confused on what to change and what to look after, I did try this:
I added in program.cs
app.UsePathBase("/DEMO/");
I added to the _Layout.cshtml
<base href="/DEMO/" />
I then tried to change the value inside launchaUrl too as
"launchUrl": "http://localhost:4000/DEMO"
I did some testing with a simple empty web server application because I want to understand how things must work there before move on the other project that use Controllers and has some folders to work with inside wwwroot too, so seem that the launch of http://localhost:4000/DEMO work, but if I remove the DEMO part I receive an error
Uncaught Error Error: Invocation canceled due to the underlying connection being closed.
at _connectionClosed (localhost꞉4000/DEMO/_framework/blazor.server.js:1:72863)
...........................
If in _layout.cshtml I remove <base href="/DEMO/" />
and change it back to <base href="~/" />
it work both on localhost꞉4000/DEMO and localhost꞉4000 and it’s good, but if I type localhost꞉4000 I want to be redirect to localhost꞉4000/DEMO address.
So please someone can help me to understand the right step to do for fix this little problems ? Best regards and thank you if you reach the end of this long post.