locked
Why do i get a 404 error when i use computer name in the address for website naviagtion ? RRS feed

  • Question

  • User1253338400 posted

    Hi ,

    I have a web app . 

    when i use 

    http://localhost/mywebapp/login.aspx Its fine and i am presented with the login page.

    but when i use 

    http://DEVPC-1/mywebapp/login.aspx it gives a HTTP 404  error.

    Now my bindings are as follows.

    Type    Host Name    Port     IP Address       Binding Information 

    http     localhost       80        *

    https   DEVPC-1       443       *

    Thanks

    Friday, June 9, 2017 4:29 AM

Answers

  • User1068175894 posted

    you should not bind DEVPC-1 to the https protocol

    create 2 sites pointing to the same folder, both with the binding in http

    if you bind to https the right url will be https://DEVPC-1/mywebapp/login.aspx  but i am not sure if that is what you want, in that case you should also setup and ssl certificate, etc

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 9, 2017 1:32 PM

All replies

  • User1068175894 posted

    you should not bind DEVPC-1 to the https protocol

    create 2 sites pointing to the same folder, both with the binding in http

    if you bind to https the right url will be https://DEVPC-1/mywebapp/login.aspx  but i am not sure if that is what you want, in that case you should also setup and ssl certificate, etc

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 9, 2017 1:32 PM
  • User1967761114 posted

    Hi robby32,

    According to your description, I think the understand of bindings for you was wrong.

    In normally you can just use the IP in the bindings without the Host name as long as the the IP is dedicated to that one domain. When you start using the same IP as a shared IP for multiple websites, that’s when you need Host Headers. When you try to browse to a domain on a shared IP, it when then find the www and non-www headers and know where to point the request. Without host headers in this situation, the site will try to resolve by IP only and since there are multiple sites on the same IP, it will not work.

      

    For more details about bindings, you could refer to the following link.

    https://blogs.technet.microsoft.com/chrad/2010/01/24/understanding-iis-bindings-websites-virtual-directories-and-lastly-application-pools/

     

    If you have any other questions, please feel free to contact me any time.

    Best Regards

    Even

    Monday, June 12, 2017 7:03 AM
  • User1068175894 posted

    Hi Robby, 

    Did this solved your issue?

    Monday, June 12, 2017 1:17 PM