locked
Can't listen on anything but localhost RRS feed

  • Question

  • I'm unable to get a .Net Framework MVC project to listen on anything except localhost.

    If I change

              <IISUrl>http://localhost:2319/</IISUrl>
    to

              <IISUrl>http://eadev:2319/</IISUrl>

    my project won't even load.

    I get the following error:

    Creation of the virtual directory http://eadev:2319 failed with the error: Cannot create the Web site 'http://eadev:2319'. You must specify "localhost" for the server name.

    I've seen just tons of issues on this, and someone in my own company has this working, but I cannot get it to work.  I actually set him up.  And I still can't do this.

    I've tried

    netsh http add url=http://eadev:2319 users=everyone

    That just gives me access denied errors when I run it from the console, but it's still trying to load localhost:2319

    I deleted the .vs directory.  I added entries to the .vs/app/config/applicationhosts.config

    I've added eadev to the hosts file.

    Also, one thing that used to work is that I downloaded nginx for Windows and setup a reverse proxy, but now it just says bad gateway.  I even setup an ssh tunnel.  I'm assuming now it's being picky about headers.  I can access http://localhost:2319, but not nginx proxy_pass http://localhost:2319 is now giving bad gateway, but it used to work.  If I point the proxy_pass to http://example.org it works.

    There are just so many answers to this and other people seem to have got it working, but I cannot.



    Saturday, August 8, 2020 1:37 AM

All replies

  • [...]

    I've added eadev to the hosts file.

    [...]


    What lines did you add to hosts file?
    • Edited by Viorel_MVP Saturday, August 8, 2020 7:43 AM
    Saturday, August 8, 2020 7:36 AM
  • Hi there,

    From the error message, it seems there is something wrong with the domain. Could you share the steps which you followed to create a domain(https://eadev...) with me? This will be useful for me to check.

    Looking forward to hearing from you.

    Best Regards,

    Tianyu


    Visual Studio forum is being migrated to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Visual Studio" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.




    Tuesday, August 11, 2020 10:04 AM
  • 127.0.0.1       eadev
    Tuesday, August 11, 2020 3:58 PM
  • I just added

    127.0.0.1       eadev

    to my hosts file

    Tuesday, August 11, 2020 3:59 PM
  • Hi there,

    Thank you for your feedback.

    You can try to flush the cache of DNS and your browser, or try to change another browser to test again.

    To flush the cache of DNS, please open Command Prompt(Admin) > Type “ipconfig /flushdns” and press Enter > Restart your computer.

    By the way, do you have a proxy server?

    Feel free to contact me.

    Best Regards,

    Tianyu


    Visual Studio forum is being migrated to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Visual Studio" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.



    Wednesday, August 12, 2020 9:44 AM
  • Hi there,

    Do you try to flush the cache of DNS and your browser? Does this issue still persist?

    Feel free to let me know the result.

    Best Regards,

    Tianyu


    Visual Studio forum is being migrated to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Visual Studio" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.


    Friday, August 14, 2020 8:36 AM