ASP.NET Default Document is not published properly

Todd Stafford
Todd Stafford used Ask the Experts™
When I created a new ASP.Net project in VS 2055 (community), I decided to create a home page for the site called homepage_hq.aspx.
I right-clicked, and made it the default doc in VS 2015, and everything works properly when I compile and run locally.

I used the built-in "Publish" feature in VS to publish to a server running IIS 7.0.  After publishing, I am having to add the default document.  It shows as entry type "Local" after I enter it, unlike the other entries like default.htm which are "Inherited."  But, when I publish again, it gets wiped-out.

How can I get the site to keep the default document, or how can I make it part of the publish process?  I know I could just move the code to default.aspx and be done with it, but what's the fun in that...
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sr. Software Engineer
In the web.config file

      <clear />
      <add value="Pages/homepage_hq.aspx" />



Perfect.  Thank you.
AshokSr. Software Engineer

Please accept my solution if it worked for you.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial