码迷,mamicode.com
首页 > Web开发 > 详细

.net 设置默认首页

时间:2018-07-25 13:50:12      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:ebs   value   work   连接字符串   --   runtime   index   database   javascrip   

解决方案一:设置默认首页

在 Web.config 文件中,加上红色字体间的内容

<configuration>

    <system.web>

        <compilation debug="true" targetFramework="4.5" />

        <httpRuntime targetFramework="4.5" />  

    </system.web>

 

    <!--设置连接字符串-->

      <connectionStrings>

          <add name="Mall" connectionString="server=.;database=Wen.Mall;uid=sa;pwd=123456"/>

      </connectionStrings>

    <!--设置连接字符串-->

 

    <!--设置默认首页-->

    <system.webServer>

        <defaultDocument>

           <files>

              <clear/>

              <add value="index.aspx"/>   <!--该页为首页-->

           </files>

        </defaultDocument>

    </system.webServer>

    <!--设置默认首页-->

 

</configuration>

  

.net 设置默认首页

标签:ebs   value   work   连接字符串   --   runtime   index   database   javascrip   

原文地址:https://www.cnblogs.com/dongh/p/9365438.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!