We found the Web.config file in the published website, open this one, add a few pieces of code inside the <configuration></configuration> tag, you can specify the page that starts by default. <system.webServer>
Copy Code code as follows:
<defaultDocument>
<files>
<add value= "dreyeonlinetestpage.html"/>
</files>
</defaultDocument>
</system.webServer>
So we don't need to manually specify a page as the starting page for the site.
Note: If you have a page in your IIS that is specified in the configuration file, you will get an error if you click the default document under the Web site in IIS, as follows:
This is because you already have this page specified in your site, because the default document is already set in IIS dreyeonlinetestpage.html, and then ASP.net gets another add of the same value that throws an exception.
So you can't add the same value, if you don't have this page in the default document for the site you're building, find it in the default document in the root directory of IIS, like the red circle in the figure:
Click on the item in the red circle, and then find the default document in the function view on the right, and then look for it in this, there is no duplication. Of course you can specify a page, put it inside, and then it will be the default starting page for all sites.
If you're looking for trouble, delete the code that adds the default document from the configuration file, or you can use clear to erase it, and then add it. The code is as follows:
<add/> before joining <clear/>
That is, modify Web.config to
Copy Code code as follows:
<system.webServer>
<defaultDocument>
<files>
<clear/>
<add value= "dreyeonlinetestpage.html"/>
</files>
</defaultDocument>
</system.webServer>
If you do not modify the default document on IIS and change it directly in the config file, it is reflected in IIS as well.