Meysam  Savameri
Meysam Savameri

Reputation: 556

How to set startup page for a specific folder?

How to set startup page for a specific folder?

enter image description here

Upvotes: 2

Views: 3990

Answers (3)

Meysam  Savameri
Meysam Savameri

Reputation: 556

ok i found solution.

<system.webServer>
<defaultDocument enabled="true">
  <files>
    <clear/>
    <add value="Pages/Default.aspx"/>
  </files>
</defaultDocument>
<modules runAllManagedModulesForAllRequests="true"/>

Upvotes: 1

Afshin Gh
Afshin Gh

Reputation: 8198

Just name it default.aspx and that's it.

UPDATE:

May be you check if default.aspx in defined in IIS as default document or not.

Check links below. It'll guide you to check if settings of IIS are OK or not.

http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/default-documents

http://www.iis.net/configreference/system.webserver/defaultdocument

Setting Default WebPage in IIS 7.5

Hope it helps

Upvotes: 0

Anant Dabhi
Anant Dabhi

Reputation: 11104

First you have to add web.config file in folder and in your web.config add this rule

<defaultDocument enabled="true">
   <files>      
       <clear/>
       <add value="index.aspx"/>     
   </files>
</defaultDocument>

  <modules runAllManagedModulesForAllRequests="true"/>

Upvotes: 1

Related Questions