Hi there currently I have a default.aspx file that I am trying to have show up when my domain is searched.
So far i’ve checked stackoverflow and have been given this general solution.
<system.webServer>
<defaultDocument enabled="true">
<files>
<clear />
<add value="default.aspx" />
</files>
</defaultDocument>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
This has gotten me nowhere. I also tried the default settings that get given aswell which show default.aspx as a Default Document in the Default Documents section here
All of these solutions kept showing the 404 not found page.
Here is a screenshot of my bindings
404 URL: https://ro-aviation.com
2
Answers
Turns out I needed to add a redirect inside in my Global.asax file as I have done below.
File: Global.asax
Do you mean you have a single file (Default.aspx) or you have a Asp.Net Web Forms project?
You will not be able to host the single Default.aspx file directly in the IIS. If you do so, you will receive errors upon visiting the page in the browser.
First, you need to publish your Asp.Net Web Forms project from the Visual Studio.
Then you need to attach that published site folder with the IIS site in the IIS.
Then you need to create bindings for your site.
If you do above 2 steps properly then when you visit your site, the Default.aspx page will get disaplayed.
As it is default page, you do not need to configure anything special.