Search code examples
asp.netiisweb-access

How to allow access to website created in IIS?


So, I decided to set up my own websites in a Windows Server 2019 environment. I think I got everything right so far, my test website is available on the browser.

However, it is only available when I set the default page as index.html. It is an ASP website, so

  1. when I delete the index.htm file from the folder so that it should pick/point to default.aspx, I get the error 403 - Forbidden: Access is denied.
  2. with the default as index.html, any links from this index file to other folders like pages/default.aspx are also denied with the error 404 - File or directory not found. But when I create an index.html I am only able to access it by typing the full file name, as in mydomain.com/pages/index.html, and not as mydomain.com/pages

What am I missing in order to complete this setup?

Thanks.


Solution

  • Did you launch IIS and check the default documents?

    eg this: enter image description here

    And then this:

    enter image description here

    Note that you can click on any of the default pages, and the move them up, or down as to which start up page is to be the default.

    enter image description here

    so, in above, we would want to move default.aspx to the top.