1

I am trying to host a web application on somee.com and I transferred over my application files and setup the database as well. I have a handful of pages in my file manager and one of them is HomePage.aspx, which is supposed to be my startup page when the website loads and I also added this in the web.config file:

            <defaultDocument>
                <files>
                    <add value="HomePage.aspx" />
                </files>
            </defaultDocument>

But when I load the website, I get this page instead Wrong Homepage

This page is what we get as Default.aspx when we first load the asp.net web application project. Let's say that my project name is MyProject. I posted the files inside MyProject excluding the .vs, packages and .sln file into the root folder at somee.com. Is there anything else that I missed while setting up the files? Please let me know.

Marius
  • 25
  • 8

1 Answers1

1

Try this config :

<system.webServer>
    <defaultDocument>
      <files>
        <clear />
        <add value="HomePage.aspx" />
      </files>
    </defaultDocument>
  </system.webServer>
Afshin
  • 1,405
  • 10
  • 18
  • Do you host your project on iis ? Did you restart your iis after changing config ? – Afshin Sep 04 '20 at 00:19
  • It's hosted on the web hosting website somee.com. Do I need to stop and start my website on the web server for the changes to take effect? – Marius Sep 04 '20 at 00:30
  • It was good for troubleshooting if you could at least restart your application pool after config change. – Afshin Sep 04 '20 at 00:35
  • It's a free plan and I thought that IIS would automatically detect a change in the web.config file. This is what they have as options: https://imgur.com/a/u3g9YtT – Marius Sep 04 '20 at 00:43
  • Changes to the web.config will trigger the app to be reloaded by IIS as soon as there are 0 connections left to the app. You have a shared host and you don't have full control of the webserver. Anyways this config is correct and should work if your path to homepage file is correct and there is no other redirection on your project or your webserver configs. – Afshin Sep 04 '20 at 00:51
  • Check the path to your homepage file. With this path, Now it should be in the root directory with your web.config file. – Afshin Sep 04 '20 at 00:56
  • The HomePage.aspx and the web.config are in the same root directory folder. Would you suggest a restart of the website based on the picture attached in the Imgur link? – Marius Sep 04 '20 at 01:06
  • Yes you can do it for troubleshooting. – Afshin Sep 04 '20 at 09:12