Abdul Rafay
Abdul Rafay

Reputation: 3391

Setting start page in web hosting ASP.NET

Parallel Plesk is not opening default page on my domain name which I've set in the default directories, instead it is opening a login page of my ASP.NET web application. However it opens default page on my domain name once I logged in by giving right credentials. Here is my web.config file:

<system.web>
    <compilation debug="true" targetFramework="4.5" />
    <authentication mode="Forms">
        <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH"></forms>
    </authentication>      
    <httpRuntime targetFramework="4.5" maxRequestLength="20896" />
    <authorization>
        <deny users="?"/>
    </authorization>
</system.web>

<location path="UserPanel.aspx">
    <system.web>
         <authorization>
             <allow users="*"/>
         </authorization>
    </system.web>
</location>

Upvotes: 0

Views: 1480

Answers (1)

mshsayem
mshsayem

Reputation: 18018

If you are hosting on IIS (7 or later), inside the <system.webServer> (of your web.config) add:

<defaultDocument>
    <files>
        <clear/>
        <add value="UserPanel.aspx" />
    </files>
</defaultDocument>

Upvotes: 1

Related Questions