Back from my weekend and went to debug my web project which is an ASP.NET Core Web Api. It started giving me an error: Invalid URI: The hostname could not be parsed.
I can start a new asp.net core web api project and it debugs fine so I'm pretty sure its something with my configuration for this project. Any ideas?
James
Solution:
Fixed:)
I post this answer because many people found my comment useful. Thanks to @joshcomley for poking me.
Hopefully this answer will help someone:
.vs
(note, this folder has a hidden attribute, so File Explorer does not show it by default).vs/config/applicationhost.config
file <site name="<Your_Web_Site_Name>" ....
. You can have several elements like this. You need to pick one where <Your_Web_Site_Name>
matches the name of your site<site
element find a child element like:<binding protocol="http" bindingInformation=":8080:localhost" />
and replace it with:
<binding protocol="http" bindingInformation=":8080:" />
Notes:
Invalid URI: The hostname could not be parsed
.<binding protocol="http" bindingInformation="*:8080:*" />
. And do iisreset
after this change.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With