8월, 2013의 게시물 표시

.NET의 Attribute는 Metadata의 일종이다.

그러하다.

custom exception 만들기.

사실 좋은 프로그램(프레임웍)일 수록 익셉션 처리에 공을 많이 들인다. 커스텀 익셉션을 만들 때 이름 뒤에 접미사 Exception 붙여아 한다. System.ApplicationException을 상속해선 안 된다. 원래는 커스텀 익셉션은 이것을 상속하도록 하는 것이 설계 의도였는데, 실제로는 그렇게 안 됐다는군...  참고

try...catch...finally에서 finally{} 블럭이 실행되지 않고 프로세스를 종료시키는 방법

Enviroment.FailFast  가 호출되면 프로세스가 바로 끝난다. 호오~.

필수 Visual Studio Add-in 혹은 Extension

Productivity Power Tools PowerCommands for Visual Studio 2010 Regex Tester ReSharper   ReSharper의 경우 돈 주고 살만한 프로그램이다. 겨우 150$. 다른 확장프로그램들은  http://visualstudiogallery.msdn.microsoft.com/  참고. 자고로 프로그래머는 게으름이 미덕이다. 참 좋은 세상이다.

.NET에서 워커(worker) 스레드의 Abort() 호출하면 하면 바로 중지?

Thread.Abort() 혹은 Thread.Suspend()를 호출하면 바로 즉시 멈출까요? 아닌것 같네요. Safe Points Most of these methods are self-explanatory, but the concept of  safe points  may be new to you. Safe points are locations in code where it is safe for the common language runtime to perform automatic  garbage collection , the process of releasing unused variables and reclaiming memory. When you call the  Abort  or  Suspend  method of a thread, the common language runtime analyzes the code and determines the location of an appropriate location for the thread to stop running. http://msdn.microsoft.com/en-us/library/vstudio/ck8bc5c6.aspx CLR이 Safe Points를 찾아서, 그곳에서 멈춘다네요.

SQL Server 2008에서 좋아진 Values 구문

Interesting enhancements to the VALUES Clause in SQL Server 2008 스칼라 값들을 Values에 여러개 묶어서 테이블 흉내를 내는 기능이 귀엽다.

나눔고딕으로 크롬 기본 폰트 바꾸기

이미지
네이버에서 다운 받아 설치 설정 > 고급설정에서 기본 폰트를 나눔고딕으로 바꾸기 훨 깔끔하군.

IT 개발 관련 책 추천.

Code Complete. 이 책을 모른다면 할 말 없당. Pro C# 2010 and the .NET 4 Platform Effective C# 2nd Pro ASP.NET MVC3 Framework Apress - Pro ASP.NET4 in CSharp 2010 4th Edition Jun 2010 Agile Principles, Patterns, and Practices in C# UML Distilled The Pragmatic Programmer, From Journeyman To Master Windows Presentation Foundation Unleashed (WPF)

Choosing a Primary Key: Natural or Surrogate?

Surrogate Key 라는 것을 처음 들어봤다. 난 무식하다. This article overviews strategies for assigning primary keys to a table within a relational database.  In particular, it focuses on the issue of when to use natural keys and when to use surrogate keys.  Some people will tell you that you should always use natural keys and others will tell you that you should always use surrogate keys.  These people invariably prove to be wrong, typically they're doing little more than sharing the prejudices of their "data religion" with you.  The reality is that natural and surrogate keys each have their advantages and disadvantages, and that no strategy is perfect for all situations.  In other words, you need to know what you're doing if you want to get it right.  This article discusses: Common key terminolo gy    Strategies for assigning keys Surrogate key implementation strategies Tips for effective keys What to do when you make the "wrong" choice 1. Common...

.NET Zip library.

DotNetZip

IIS 7.5 오류 추적

대체 원인을 알 수 없는 에러가 계속된다면 "Trace Failed Requests"을 이용해 로그를 남기자. 기본 IIS 설정에서는 비활성화되어 있는 기능이다. 원문

천왕역 공영주차장의 위엄

이미지
서울 시내 나갈때, 보통 천왕역 공영주차장을 이용함. 환승 + 경차 할인을 받았더니 8,000원 요금에서 할인받아 800원 결재. 경차 할인은 어떻게 적용되나 물어보니, 자동으로 인식한다고 함. 참 좋은 세상이다. 천왕역은 4급지에 경차로 환승하면 초반 3시간 면제 후, 80% 감면. ㄷㄷㄷ. 요금 체계

IIS 7.5에서 Classic asp 운영.

Windows Server 2003에서 2008로 업그레이드 했으면 아래의 설정 변경외에는 특별한 추가 작업은 필요없다. c:\windows\system32\inetsrv\config\applicationhost.config 파일에 <security> <requestfiltering> <requestlimits maxAllowedContentLength="100485760" /> </requestFiltering> </security> 를 추가해서 업로드 크기의 기본값(4MB)를 변경해주자. asp파일의 경우에는 이 섹션의 크기 제한만 적용받는다. 이벤트 로그에 쌓인 정체불명의 에러. 오류: 응용 프로그램 풀 'GMR'에 대한 Template Persistent Cache 초기화에 실패했습니다. 응용 프로그램 풀에 대한 디스크 캐시 하위 디렉터리를 만들지 못했습니다. 오류 때문입니다. 데이터에 추가 오류 코드가 들어 있을 수 있습니다.. 원인은 기본 캐쉬 디렉토리가 존재하지 않기 때문. 기본 설정은 "%windir%\system32\inetsrv\ASP Compiled Templates" 해결책은 이 디렉토리를 생성하고 쓰기 권한을 주면 됨. 원문

ASP.NET Config 파일 계층

이미지
Configuration level File name File description Server Machine.config The Machine.config file contains the ASP.NET schema for all of the Web applications on the server. This file is at the top of the configuration merge hierarchy. IIS ApplicationHost.config ApplicationHost.config is the root file of the IIS 7.0 configuration system. It includes definitions of all sites, applications, virtual directories, and application pools, as well as global defaults for the Web server settings. It is in the following location: %windir%\system32\inetsrv\config Root Web Web.config The Web.config file for the server is stored in the same directory as the Machine.config file and contains default values for most of the system.web configuration sections. At run time, this file is merged second from the top in the configuration hierarchy. Web site Web.config The Web...