Setting folder default page in aspnet(在 aspnet 中设置文件夹默认页面)
问题描述
我的问题很简单.我有一个包含多个子文件夹的 Web 应用程序,但其中的任何一个都没有 Default.aspx 页面.
My question is really simple. I have a Web application with multiple sub-folders and there's no Default.aspx page in any of these.
如何在每个文件夹中设置默认页面,以便用户可以键入/folder 而不是/folder/login.aspx?
How do I set the default page in each of these folders so users can type /folder instead of /folder/login.aspx?
这可以通过 web.config 文件完成吗?我应该将每个文件夹中的文件重命名为 Default.aspx 吗?
Can this be done through the web.config file? Should I just rename the file in each folder to Default.aspx?
谢谢!
推荐答案
有一个web.config 的默认文档部分,您甚至可以在每个文件夹中放置一个 web.config,并且在该配置中只设置默认文档.
There is a default document section for web.config, and you can even put a web.config in each folder, and inside that config just have the default document set.
这篇关于在 aspnet 中设置文件夹默认页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 aspnet 中设置文件夹默认页面


- WebMatrix WebSecurity PasswordSalt 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- C# 中多线程网络服务器的模式 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 输入按键事件处理程序 2022-01-01