ASP.NET MVC 4应用程序文件夹

简介: App_Start It has configuration classes to reduce clutter code in the Global.asax 它包含了配置类来减少在Global.asax中的杂乱代码 Application_Start 方法 App_Start 文件夹里有如下文件:AuthConfig.cs: Related to security settings, including sites for OAuth login. 关于安全设置,包含网站的授权登录。

App_Start

It has configuration classes to reduce clutter code in the Global.asax

它包含了配置类来减少在Global.asax中的杂乱代码

Application_Start 方法

App_Start 文件夹里有如下文件:

AuthConfig.cs: Related to security settings, including sites for OAuth login.

关于安全设置,包含网站的授权登录。

BundleConfig.cs: Related to register bundles for the bundling and minification

有关用于捆绑和微小的注册

FilterConfig.cs: To register global MVC filters.(by default HandleErrorAttribute is registered)

用来注册全局MVC过滤。(默认HandleErrorAttribute是已注册的)

RouteConfig.cs: Related to MVC Route configuration

有关MVC路由的配置

WebApiConfig.cs: Used to register Web API routes and configuration settings.
用于注册Web API路由和配置设置。

Also, this folder helps to use nuget packages that use Application_Start code, without touching Global.asax.cs.
同样,这个文件夹帮助NuGet包使用Application_Start代码儿不接触Global.asax.cs。

Areas

An MVC structure inside the application to partition our web application into smaller parts.

一个MVC架构在应用程序分割我们的web应用成较小的部分。

Content

To put CSS and other static contents

存放CSS和其他静态目录

Controllers

Contains the controller classes

包含控制类

Images

For images, It is being referenced from the Content\Site.css by default.

针对Imanges文件夹,它默认被从Content\SIte.css引用。

Models

Contains view model and domain model classes.

包含视图模型和域模型类

Scripts

Stores all JavaScript libraries and files

存储所有的Javascript库和文件

Views

Related to the display of the application (UI).

关于应用程序界面的显示

/Views/Shared

This directory holds layouts (master-page in-terms of web forms) and views which is used to store views shared between controllers 

这个目录掌握着布局(web表单的主页)和被用于在控制类之间存储视图共享的视图

/Views/[FolderName]

Views or Partial Views specific to that folder or single controller like Account folder is specific to Account controller for registering and logging in to user accounts.

视图或者Partial视图针对文件夹或者单个控制,像Account文件夹是针对Account控制类用来注册和打印用户账号的日志。

目录
相关文章
|
7天前
|
JSON 数据格式
【Azure Fabric Service】演示使用PowerShell命令部署SF应用程序(.NET)
本文详细介绍了在中国区微软云Azure上使用Service Fabrics服务时,通过PowerShell命令发布.NET应用的全过程。由于Visual Studio 2022无法直接发布应用,需借助PowerShell脚本完成部署。文章分三步讲解:首先在Visual Studio 2022中打包应用部署包,其次连接SF集群并上传部署包,最后注册应用类型、创建实例并启动服务。过程中涉及关键参数如服务器证书指纹和服务端证书指纹的获取,并附带图文说明,便于操作。参考官方文档,帮助用户成功部署并运行服务。
99 72
|
2月前
|
C# Android开发 iOS开发
2025年全面的.NET跨平台应用框架推荐
2025年全面的.NET跨平台应用框架推荐
131 23
|
3月前
|
监控 前端开发 API
一款基于 .NET MVC 框架开发、功能全面的MES系统
一款基于 .NET MVC 框架开发、功能全面的MES系统
|
3月前
|
算法 Java 测试技术
Benchmark.NET:让 C# 测试程序性能变得既酷又简单
Benchmark.NET是一款专为 .NET 平台设计的性能基准测试框架,它可以帮助你测量代码的执行时间、内存使用情况等性能指标。它就像是你代码的 "健身教练",帮助你找到瓶颈,优化性能,让你的应用跑得更快、更稳!希望这个小教程能让你在追求高性能的路上越走越远,享受编程带来的无限乐趣!
187 13
|
4月前
|
开发框架 监控 .NET
【Azure App Service】部署在App Service上的.NET应用内存消耗不能超过2GB的情况分析
x64 dotnet runtime is not installed on the app service by default. Since we had the app service running in x64, it was proxying the request to a 32 bit dotnet process which was throwing an OutOfMemoryException with requests >100MB. It worked on the IaaS servers because we had the x64 runtime install
|
4月前
|
JSON 算法 安全
JWT Bearer 认证在 .NET Core 中的应用
【10月更文挑战第30天】JWT(JSON Web Token)是一种开放标准,用于在各方之间安全传输信息。它由头部、载荷和签名三部分组成,用于在用户和服务器之间传递声明。JWT Bearer 认证是一种基于令牌的认证方式,客户端在请求头中包含 JWT 令牌,服务器验证令牌的有效性后授权用户访问资源。在 .NET Core 中,通过安装 `Microsoft.AspNetCore.Authentication.JwtBearer` 包并配置认证服务,可以实现 JWT Bearer 认证。具体步骤包括安装 NuGet 包、配置认证服务、启用认证中间件、生成 JWT 令牌以及在控制器中使用认证信息
214 2
|
5月前
|
SQL XML 关系型数据库
入门指南:利用NHibernate简化.NET应用程序的数据访问
【10月更文挑战第13天】NHibernate是一个面向.NET的开源对象关系映射(ORM)工具,它提供了从数据库表到应用程序中的对象之间的映射。通过使用NHibernate,开发者可以专注于业务逻辑和领域模型的设计,而无需直接编写复杂的SQL语句来处理数据持久化问题。NHibernate支持多种数据库,并且具有高度的灵活性和可扩展性。
83 2
|
5月前
|
开发框架 .NET API
Windows Forms应用程序中集成一个ASP.NET API服务
Windows Forms应用程序中集成一个ASP.NET API服务
135 9
|
6月前
|
数据采集 JSON API
.NET 3.5 中 HttpWebRequest 的核心用法及应用
【9月更文挑战第7天】在.NET 3.5环境下,HttpWebRequest 类是处理HTTP请求的一个核心组件,它封装了HTTP协议的细节,使得开发者可以方便地发送HTTP请求并接收响应。本文将详细介绍HttpWebRequest的核心用法及其实战应用。
256 6
|
6月前
|
开发框架 前端开发 JavaScript
ASP.NET MVC 教程
ASP.NET 是一个使用 HTML、CSS、JavaScript 和服务器脚本创建网页和网站的开发框架。
99 7

相关实验场景

更多