[ASP.NET CORE MVC] help with docker
So im trying to containerize my app with docker. I was able to get it working locally. but here is the problem: throughout my client side code where I fetch data from my api, I have hard coded the IIS Express url (https://localhost:44378/), and that is different than dockers URL(https://localhost:8080/). so whenever I launch my app with IIS Express instead of docker, all the fetches fail cause im pointing to the wrong port (also theres thing thing where https wont work but http will but ill worry about that later).
1 Reply
So the problem is that, if I want to run my app with IIS express again, I have to first change the client fetches to point to the IIS express url 44378 instead of the docker url 8080, and then after that I have to change the host in the connection string from db to localhost. Here is some of what I am talking about:
and then in my appsettings.json, where I have my connection string, I have to change the host from localhost to db:
ive also attached my docker window to show what it looks like
I feel like I have to tell which environment i am in but i still dont understand how it works in .net. can anyone help me please? thanks
im not sure why i am trying to get iis to work now that i think about it but can anyone give me some advice about this
nvm