2015-05-14 72 views
0

并行Plesk没有在我的域名上打开默认页面,而我在默认目录中设置了它,而是打开了我的ASP.NET Web应用程序的登录页面。然而,一旦我通过提供正确的凭据登录,它就会在我的域名上打开默认页面。 这里是我的web.config文件:在虚拟主机ASP.NET中设置起始页面

<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> 
+0

你在哪里设置默认页面? – Izzy

+0

Plesk >>网站&域名>>显示高级选项>>虚拟目录>>目录属性 –

+0

iis是你的主机吗? – Izzy

回答

1

如果你正在主持在IIS(7或更高版本),内(您web.config)的<system.webServer>补充:

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

我想使UserPanel.aspx我的开始页面,这对我不起作用:( –

+0

尝试将值更改为UserPanel .aspx'(edited)? – mshsayem

+0

不能正常工作。问题是在登录Login.aspx的表单上工作正常后,它每次打开域名上的UserPanel,但是如果我没有登录,它不会打开域上的UserPanel名称 –