본문 바로가기

.NET

(219)
How to disable optimizations when debugging Reference Source 좋은 글이라 생각되어 한번 올려봅니다. 출처: http://blogs.msdn.com/b/sburke/archive/2008/01/29/how-to-disable-optimizations-when-debugging-reference-source.aspx When you debug code in the .NET Framework using the newly available Reference Source functionality in VS 2008, you may notice that many variables are not available for inspection.This is because you're debugging against retail-optimized code. In many cases..
!address -summary explained 출처 : http://blogs.msdn.com/b/webtopics/archive/2010/04/02/address-summary-explained.aspxIn order to debug any high memory issue we rely heavily on the output of !address –summary command [You’ll find !address –summary as the part of Ext.dll extension]. We can interpret quite a few things from it which can help us in further debugging. Here’s how For example (for 32 bit app) 0:027> !address –summ..
.NET Exceptions: Quick WinDbg/SOS tip on how to dump all the .NET exceptions on the heap 출처 :http://blogs.msdn.com/b/tess/archive/2009/04/16/net-exceptions-quick-windbg-sos-tip-on-how-to-dump-all-the-net-exceptions-on-the-heap.aspx Since a .net exception is a .NET object like any other, it gets stored on the GC heap when you (or some code you call) calls new XXException(). This means that if you have a memory dump of a process you can dump out all the recent exceptions that have occ..
풀 덤프 파일을 남기는 방법 [출처] 풀 덤프 파일을 남기는 방법|작성자 techshare 출처: http://blog.naver.com/techshare?Redirect=Log&logNo=100121443615&from=postView sos나 psscor 같은 도구들이 나오면서 닷넷 응용 프로그램의 디버깅에서 windbg 위치가 다소 상향되었지요. ^^ 개발자 PC에서 재현되지 않는 문제에 대해 디버깅을 해야 하는 상황이라면, windbg를 이용해서 현재 실행중인 프로그램에 연결해서 살펴보는 것이 최선일 것입니다. 하지만, 만약 그것이 "운영 서버"라면 차선책으로 "풀 덤프"를 고려해 볼 수 있습니다. (또는, 저처럼 서툰 windbg 사용자라면 고객 앞에서 버벅거리는 것보다 회사에 와서 차근 차근히 검색도 해가면서 풀어보는 것이 더욱 현실적인 이유가 될 수 있겠고. ^^) 이번 글에서는,..
한자 등록시 ? 표시 해결하기 디비 스키마가 nvarchar가 아닌 varchar로 되어있을 경우 부득히가하게 스키마 변경이 불가능하다면 아래의 코드로 ?로 입력되는 문자를 unicode로 치환하면 된다. 우리 시스템이 그런 상황이라 한번 만들어 봤다. 아래의 메서드를 적용해 보길바란다. public string GetUnicodeString(string input) { Encoding encoding = Encoding.GetEncoding(51949);//중국어 간체 var bytest = encoding.GetBytes(input); var output = encoding.GetString(bytest); Console.WriteLine(input); Console.WriteLine(output); List unicodes = ..
ASP.NET 자바스크립트 디버깅 아실지 모르지만 asp.net 클라이언트 자바스크립트를 디버깅하기위해 다음과 같이 코딩하면 자동적으로 visual studio에서 자바스크립트 디버깅이 실행됩니다. 첫째 둘째 위의 이미지 처럼 디버깅을 사용한 툴을 선택해 주면됩니다. 끝
Assembly Manipulation and C# / VB.NET Code Injection http://www.codeproject.com/Articles/20565/Assembly-Manipulation-and-C-VB-NET-Code-Injection 위에 기사에서 퍼온 글입니다. Assembly Manipulation and C# / VB.NET Code InjectionBy Sebastien LEBRETON, 26 Apr 2013 4.97 (151 votes) 1 2 3 4 54.97/5 - 151 votes8 removedμ 4.90, σa 1.12 [?] Download binaries - 1.3 MB Download source - 4.7 MB Latest ReleasesYou can always get the latest Reflexil releases here.Introduct..
BinaryFile 을 Hex로 표현하기 오늘 심심해서 이미지 바이너리 코드를 hex로 보고 싶었다 그래서 한번 코드를 작성해 봤다 using (BinaryReader reader = new BinaryReader(new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read))) { byte line; int count = 1; int pos = 0; int length = (int)reader.BaseStream.Length; while (pos < length) { line = reader.ReadByte(); result += line.ToString("X").PadLeft(2,'0'); if (count % 16 == 0) { result += "\r"; } pos +=..