본문 바로가기
728x90

c#9

기본 연결이 닫혔습니다. 보내기에서 예기치 않은 오류가 발생했습니다. var httpResponse = (HttpWebResponse)httpRequest.GetResponse(); 호출 시 -> 기본 연결이 닫혔습니다. 보내기에서 예기치 않은 오류가 발생했습니다. // .NET 4.0 이하에서 TLS 1.2 활성화 ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; // TLS 1.2의 정수 값 // .NET 4.5 이상에서 TLS 1.2 활성화 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 2023. 11. 7.
<string xmlns="http://tempuri.org/"> </string> 없애기 [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public void function() { HttpContext.Current.Response.ContentType = "application/json"; // error on line 1 at column 1: document is empty string result = new JavaScriptSerializer().Serialize(new { result = list }); HttpContext.Current.Response.Write(result); } 2022. 6. 15.
System.Web.Helpers.Json..cctor() 메서드가 System.Web.Helpers.Json.CreateSerializer() 메서드에 액세스하지 못했습니다 System.Web.Helpers.Json..cctor() 메서드가 System.Web.Helpers.Json.CreateSerializer() 메서드에 액세스하지 못했습니다 -> http://stackoverflow.com/questions/7066726/attempt-by-method-system-web-helpers-json-cctor-to-access-method-system-we 2015. 9. 7.
zedgraph Vertical Bar With Labels Demo From ZedGraphWiki Jump to: navigation, search NOTE: The code on this page is for ZedGraph version 5. You can view the code for version 4 here. // Call this method from the Form_Load method, passing your ZedGraphControl public void CreateChart( ZedGraphControl zgc ) { GraphPane myPane = zgc.GraphPane; // Set the title and axis labels myPane.Title.Text = "Vertical Bar.. 2013. 4. 27.
EventType clr20r3 P9 system.io.fileloadexception 좀 모호한 문제.. 재현경로 : windows xp service pack 3 재현증상 : 처음 설치 후에는 문제가 없으나 pc 를 재부팅 하면 문제가 재현 됨 대응방안 : 윈도우 업데이트를 모두 완료하면 문제 재현이 안됨 2013. 4. 27.
윈도우 서비스 등록 sc command 2013. 4. 27.
메모리 사용량 체크 윈도우 폼을 만들어 실행할 때 현재 프로그램이 메모리를 얼마나 사용하는지, 어떤 동작에 메모리 변화가 어떤지 실시간으로 확인하고 싶은 경우가 많이 있죠. 그래서 다음과 같은 코드가 필요할 수 있습니다. 먼저 디자이너 코드에는 다음과 같이 Timer Class가 있어야 합니다. private System.Windows.Forms.Timer timer1; private void InitializeComponent() { this.timer1 = new System.Windows.Forms.Timer(this.components); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 3000; // 3초마다 메모리 값을 읽어옵니다. this... 2013. 4. 27.
Delay public static void Delay(Single DelayInMilliseconds) { DateTime STime = DateTime.Now; TimeSpan span; do { Application.DoEvents(); System.Threading.Thread.Sleep(2); span = DateTime.Now - STime; } while (span.TotalMilliseconds < DelayInMilliseconds); } 2013. 4. 27.
현재 프로세스 , 메모리 총사용량 using System.Diagnostics; // Process pro = Process.GetCurrentProcess(); // 현재 프로세스 사용량 //메모리 총사용량 Process[] allPro = Process.GetProcesses(); long memory = 0; foreach (Process pro in allPro) { memory += pro.VirtualMemorySize64; } 2013. 4. 27.
728x90