开发者

Starting an asp.net project from a file except Default .aspx?

I wanna start my project from a file except Default.aspx

e.g : MasterFile.aspx

Is there a setting for开发者_如何学运维 doing that in Visual Studio 2010?

Thanks.


Default page settings is somewhat different from one version of IIS to another version.

If you have IIS7 or IIS Express then add following entry in web.config file

<system.webServer>
    <defaultDocument>
      <files>
        <clear/>
        <add value="MasterFile.aspx"/>
      </files>
    </defaultDocument>
</system.webServer>

Or you may use urlMappings,

<system.web>
     ....
    <urlMappings>
      <add url="~/Default.aspx" mappedUrl="~/MasterFile.aspx"/>
    </urlMappings>
</system.web>

Setting Up Default Documents (IIS 6.0)


Plus to the comment above, when you deploy on IIS set the default document name to MasterFile.aspx in the virtual directory or application configuration and page will be loaded also when users only have application url in browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜