0

How I can set the default I wrote in the web.config this code and it doesn't work

<!--<defaultDocument>
  <files>
    <clear/>
    <add value="~/HomePage.aspx"/>
  </files>
</defaultDocument>-->
</system.webServer>

<system.web>
      <urlMappings>

  <add url="~/Default.aspx" mappedUrl="~/HomePage.aspx"/>
</urlMappings>
Rhapsody
  • 6,017
  • 2
  • 31
  • 49
mnaftal
  • 1
  • 2
  • these existing questions may be of help : [1](http://stackoverflow.com/questions/1125280/setting-the-default-page-for-asp-net-visual-studio-server-configuration) and [2](http://stackoverflow.com/questions/1022949/change-default-startup-page-asp-net-windows-hosted-godaddy) – Menahem Mar 22 '11 at 11:02

1 Answers1

1

Put urlMappings tag inside the system.web tag like:

    <system.web>
            <urlMappings enabled="true">
                 <add url="~/Default.aspx" mappedUrl="~/index.aspx"/>
            </urlMappings>
</system.web>
Brij
  • 11,731
  • 22
  • 78
  • 116