Reputation: 1
I hosted a website using VS2012. My problem is the Home page is not specified by default whenever I access the website. Pleases would you mind to show me how to add Default.aspx or Home.aspx into my Web.config so as I can edit it.
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly=""/>
<add assembly=""/>
<add assembly=" "/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
</system.web>
</configuration>
Upvotes: 0
Views: 223
Reputation: 36
Well, just go to webconfig and add it:
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Path of your Page" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
Upvotes: 0
Reputation: 32728
In VS, you configure that by right clicking the web project, clicking Properties, going to the Web tab, and specifying a Specific Page for Start Action.
Note that this setting doesn't get set in Web.Config
, and doesn't carry over when you deploy to IIS. You'd handle the default page within IIS Manager by setting the Default Document for your site.
Upvotes: 1
Reputation: 585
You can right click the .aspx file you want to be default in visual studio, and then "Set as Start Page".
Upvotes: 1