2

I am trying to render my asp.net core app locally on https://localhost:44301 and also https://sub.localhost.test.

I added the following to my hosts file 127.0.0.1 sub.localhost.test. Then I edited the binding info in the C:/ProjectName/.vs/config/applicationhost.config file to the following

<site name="ProjectName" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
      <virtualDirectory path="/" physicalPath="C:\ProjectName" />
    </application>
    <bindings>
      <binding protocol="https" bindingInformation="*:44301:localhost" />
      <binding protocol="https" bindingInformation="sub.localhost.test" />
    </bindings>
</site>

I also trird <binding protocol="https" bindingInformation="*:44301:sub.localhost.test" />. But, when I go to https://sub.localhost.test I get Unable To Connect error.

Is it possible to run my local project on both https://localhost:44301 andhttps://sub.localhost.test`? If so, how?

  • Spend some time on what is site binding, and then the answer should be clear https://docs.jexusmanager.com/tutorials/binding-diagnostics.html – Lex Li Nov 02 '19 at 02:31
  • @LexLi, I installed JexusManager and added the binding directly from there to ensure I am not missing anything, but it still does not render. When I view the "IIS Express" that is running, I don't even see the subdomain listed as a valid website. I only see a link to the https and the https links with localhost. –  Nov 03 '19 at 00:44
  • Run the actual diagnostics from Jexus Manager and check what the report says. – Lex Li Nov 03 '19 at 14:26
  • @LexLi after clearing my browser data, I am getting an error now. the error I get is ` HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure ` not that the localhost:44301 is running with no error. –  Nov 03 '19 at 19:37
  • Does this answer your question? [Get Visual Studios to use subdomain?](https://stackoverflow.com/questions/4047058/get-visual-studios-to-use-subdomain) – Arash.Zandi Dec 28 '19 at 17:24

1 Answers1

0

Use port in the bindings. For http port 80 for https post 443

<binding protocol="https" bindingInformation="*:443:sub.localhost.test" />
    </bindings>

Reference

Mukul Keshari
  • 495
  • 2
  • 7