전체 글
![[ASP.NET Core] IIS 배포 (게시)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FBkEPM%2FbtrnQ3HkQHo%2FfuyrKZZErtIFQKe1WWubrk%2Fimg.png)
[ASP.NET Core] IIS 배포 (게시)
ASP.NET 응용program을 IIS에 배포하기 위한 가장 흔한 방법으로 자체 folder(일반적으로 publish)에 project전체를 배포하고 이를 FTP나 단순복사를 통해 IIS의 Web Service가 동작중인 위치에 붙여넣는 방식입니다. 이 방법 외에 IIS Web Server로 곧장 배포하는 방식이 있는데 이에 대해 알아보고자 합니다. 1. 역활 및 기능추가 Web Server에서 아래와 같이 'IIS Mnagement Scripts and Tools(IIS 관리 스크립트 및 도구)'와 'Management Service(관리 서비스)' 역활 그리고 '기본 인증'을 추가합니다. 2. Web Deploy 설치 아래 주소에서 Web Deploy를 내려받아 server에 설치합니다. Micro..
![[Visual Studio IDE] Visual Studio IDE의 Registry 설정](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FqCi24%2FbtrmiFHfIU4%2Ftq4s0OWKK46daVOVdViNaK%2Fimg.png)
[Visual Studio IDE] Visual Studio IDE의 Registry 설정
* Visual Studio IDE라는 표현은 Visual Studio Code와의 명칭에 대한 혼동을 방지하고자 하는 것이며 Visual Studio 2019나 2022등의 IDE를 의미합니다. Visual Studio IDE는 다른 program과 마찬가지로 자신의 설정관리를 위해 Registry를 이용하고 있습니다. 그런데 실제 Windows 운영체제의 Regedit를 뒤져보면 Visual Studio IDE와 관련한 설정을 찾을 수 없는 경우가 많은데 그 이유는 Visual Studio IDE는 이 설정 자체를 별도의 file로 따로 분리하여 관리하고 있기 때문입니다. 실제 Visual Studio 2022의 경우 아래 경로에 있는 C:\Users\Administrator\Local Setting..
![[SQL Server] Memory 관리](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdyWQ3n%2FbtrlYROhF59%2FNc36YtVnbUlsQBEz0jqpJ0%2Fimg.png)
[SQL Server] Memory 관리
MS SQL Server는 기본적으로 사용할 수 있는 메모리를 최대한 사용하도록 되어 있습니다. 문제는 사용한 메모리를 다시 반환하지 않는다는 건데 이 때문에서 DB서버상에 다른 Service가 영향을 받게 되는 경우라면 Memory를 제한하는 설정을 적용해줄 필요가 있습니다. Memory제한 설정은 현재 Server에 설치된 물리적 Memory에 따라 달라질 수 있는데 해당 내용에 관해서는 아래 표를 참고하시면 됩니다. Memory 설정값 2GB 1500 4GB 3200 6GB 4800 8GB 6400 12GB 10000 16GB 13500 24GB 21500 32GB 29000 48GB 44000 64GB 60000 72GB 68000 96GB 92000 128GB 124000 SQL Server E..
[ASP.NET Core] Session
1. Service 설정 Startup.cs의 ConfigureServices() method에서 Session을 사용하기 위한 Service를 추가합니다. services.AddDistributedMemoryCache(); services.AddSession(option => { option.Cookie.Name = "mySession"; option.IdleTimeout = TimeSpan.MaxValue; //기본값 20분 }); AddDistributedMemoryCache() method는 Server의 Cache memory를 사용하도록 하기 위한 것으로 Session을 저장하기 위함이며 AddSession()은 Session자체의 설정으로 Cookie.Name으로 Session의 이름을, I..
![[ASP.NET Core] Logging](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcgCQXW%2FbtrkJljdvHy%2F60LGWa1uISeYKc4dw7r0l0%2Fimg.png)
[ASP.NET Core] Logging
1. NuGet Package 설치 NuGet에서 etEscapades.Extensions.Logging.RollingFile package를 project에 설치합니다. 2. Log File 설정 Program.cs를 다음과 같이 수정해 ConfigureLogging method를 설정합니다. Host.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext) => hostingContext.AddFile(options => { options.FileName = "log-"; options.LogDirectory = "Logs"; options.FileSizeLimit = null; //기본 10MB, 단위 MB options.RetainedFileC..
![[ASP.NET Core] Claim 인증과 권한](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbw9AMN%2FbtrkijNnVcC%2F04PEBTVg30Jr37A7EHgfSk%2Fimg.png)
[ASP.NET Core] Claim 인증과 권한
Claim은 특정한 key값을 통해 사용자 인증 및 권한을 관리하며 여기에 필요한 data를 추가하여 사용할 수 있는 인증방법입니다. 1. 기본설정 Startup.cs의 ConfigureServices() method에 인증 및 권한에 관련한 service를 추가합니다. services.AddAuthentication(defaultScheme: CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(option => { option.AccessDeniedPath = "/Home/Error"; option.LoginPath = "/login"; }); services.AddAuthorization(); services.AddHttpContextAcces..
[ASP.NET Core] 암호화 사용하기(DataProtection)
1. Class Library형식의 Project를 생성하고 'Microsoft.AspNetCore.DataProtection' 이름의 Nuget package를 설치합니다. 2. project에 다음과 같은 class를 추가해 사용할 암호화 algorithm을 지정합니다. 예제에서는 myWebLibrary라는 이름의 project를 생성하였습니다. using Microsoft.Extensions.DependencyInjection; using System; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel; namespace ..
[ASP.NET Core] SQL 사용하기
아래 method를 사용하기 위해서는 Microsoft.EntityFrameworkCore와 Microsoft.EntityFrameworkCore.Relational package가 설치되어 있어하며 using Microsoft.EntityFrameworkCore; 으로 namespace사용을 선언합니다. 1. FromSqlRaw / FromSqlInterpolated TestContext tc = new TestContext(); tc.TblUser.FromSqlRaw($"Select seq, userID, userPW From TBL_User;").ToList(); //또는 string user = "abc"; tc.TblUser.FromSqlRaw($"Select seq, userID, userPW..