티스토리 뷰

Programming/C#

[ASP.NET/C#] ASP.NET이란?

RosyPark 2022. 3. 4. 16:43

ASP.NET

ASP.NET은 HTML, CSS 및 JavaScript를 사용하여 유용한 웹 사이트와 웹 애플리케이션을 작성할 수 있는 무료 웹 프레임워크

ASP.NET MVC 및 ASP.NET Core은 거의 똑같음 

더 많은 차이점 --> ASP.NET MVC와 ASP.NET Core 간의 구성 차이점 | Microsoft Docs

 

ASP.NET Core ASP.NET MVC
독립 실행형 프로그램, 리눅스에도 올릴 수 있음  Windows 운영 체제에서 사용할 수 있는 기본 웹 서버인 IIS (Internet Information Server) 내에 완전히 포함
일반적으로 응용 프로그램에 대 한 진입점을 포함 하는 프로그램 .cs 파일이 포함 iis 내에서 호스팅되는 ASP.NET apps는 iis를 사용 하 여 특정 개체를 인스턴스화
= JAVA의 spring Boot ?  = JAVA의 Strping? 

 

 

 

MVC 패턴

모델(Model), 뷰(View), 그리고 컨트롤러(Controller)의 세 가지 주요 구성 요소로 분리

 

 

Web API 2

 

 

 

 

ASP.NET Web API 2(C#)를 사용한 시작 - ASP.NET 4.x | Microsoft Docs

 

 

ASP.NET Core Web API 

 

1. Connected Services

2. Properties

(1) launchSettings.json 

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:5000",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "WebAPI": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "applicationUrl": "http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

 

3. Controllers

4. Models

5. appsetting.json

{
  "ConnectionStrings": {
    "EmployeeAppCon": "Data Source=.;Initial Catalog=EmployeeDB; Integrated Security=true"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}

 

5. cs파일(Class File) 

 

 

 

NuGet Package Manager 

- NuGet is the package manager for .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers. 

- 즉 .Net 라이브러리를 쉽게 설치할수 있는 통로

- 경로? Tools >> NuGet Package Manager >> Manage NuGet Packages for Solutions 

 

 

출처)

1. https://docs.microsoft.com/ko-kr/aspnet/overview

 

ASP.NET 개요

웹 사이트, 웹 응용 프로그램 및 Web API를 만들 수 있는 무료 프레임워크 ASP.NET을 소개합니다.

docs.microsoft.com

2. egocube.core - ASP.NET Core MVC: Controllers 기술문서 번역

3. 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함