본문 바로가기

Web_Application

(94)
JSON JavaScriptSerializer를 사용하여 serialize 또는 deserialize하는 동안 오류가 발생했습니다. 문자열의 길이가 maxJsonLength 속성에 설정된 값을 초과합니다. ASP.NET MVC 작업 중 JSON 으로 반환 받을때 serialize / deserialize 시에 생성되는 문자열의 길이에 제한이 있습니다. #1 인터넷에 가장많이 검색되는 방법으로 전역적으로 설정하는 방법 #2 해당 요청에만 설정하며 적용하는 방법 출처 : http://rion.io/2013/04/28/handling-larger-json-string-values-in-net-and-avoiding-exceptions/ JsonResult returnJsonResult = new JsonResult(); returnJsonResult = Json(resultList); returnJsonResult.MaxJsonLength = 2147483647; return returnJsonResult;
C# Override Object Equals /*** * Excerpted from "Test Drive ASP.NET MVC", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any purpose. * Visit http://www.pragmaticprogrammer.com/titles/jmasp for more book information. ***/ usin..
CORS 해결방법 web.config 에서 추가 ..
Ajax.beginForm 이 작동하지 않을때 VS2013 기준 TOOLS > NuGet PakageManager > Manage NuGet Pakages for Solution... > Installed pakages 에서 "Miscrosoft jQuery Unobtrusive Ajax " 설치 유무 확인하세요. 없으면 Online 탭에서 검색 후 설치하세요. BundleConfig.cs public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBu..
[ASP.NET MVC] 도로명주소 검색하기 소스 도로명주소 안내시스템(http://www.juso.go.kr/openIndexPage.do) 의 open api 연계가이드를 바탕으로 작성하였습니다. 가이드에서 제공하는 url에 직접 ajax 호출시 IE 저버전(7,8,9)에서 XSS가 발생함. jQuery 의 권고 ( $.support.cors = true; ) 적용시 보안 컨텐츠경고창이 뜨게되니 이방법도 패스~ Ajax 호출부 URL을 로컬 경로로 변경하고 HttpWebRequest 로 호출 후 string 으로 결과값 반환하는 방식으로 변경 Controller public string RoadAddress(string confmKey, int currentPage = 1, int countPerPage = 10, string keyword = ""..
차트에서 포인트별 ToolTip 표시 샘플코드 foreach (DataContext.DataUsage item in MacAddressItemList) { chart_DataUsage.Series[OutboundIP].Points.AddXY(item.DateTime.ToString(), item.UseData); chart_DataUsage.Series[OutboundIP].ToolTip = "1111"; if (MaxDataUsage