Study/ASP.NET MVC & Core2022. 6. 22. 17:47
Study/ASP.NET MVC & Core2020. 3. 11. 10:02
Study/Bookmark2011. 7. 8. 09:52
ActionResult의 Type중 ContentResult를 이용한다

출처 : http://netframework.tistory.com/179
Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:51

엑셀내보내기 기능은 잘되나 단점은 스프레드 시트 생성 기능은 지원 안 하며

Linq To SQL(dbml) 을 사용 하도록 구현 되어 있음.

DataTable 이나 Entity base 모델로 구현되어 있다면 가볍게 패스~

출처 : http://code-inside.de/blog/2010/01/29/howto-excel-export-mit-asp-net-mvc-und-render-view-to-string/

Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:48
Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:46
Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:45
출처 : http://openchannel.co.kr/8934996

NET의 System.Net 네임스페이스는 웹 상의 request와 response를 처리하기 위해 WebRequest와 WebResponse라는 클래스를 제공한다.
Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:44
Posted by 굥쓰
Study/MSDN2011. 7. 8. 09:42
출처 : http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.maxjsonlength.aspx

 

JavaScriptSerializer.MaxJsonLength Property

Gets or sets the maximum length of JSON strings that are accepted by the JavaScriptSerializer class.

Namespace:  System.Web.Script.Serialization
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)
'Declaration

Public Property MaxJsonLength As Integer
	Get
	Set

Property Value

Type: System.Int32
The maximum length of JSON strings. The default is 2097152 characters, which is equivalent to 4 MB of Unicode string data.
Exception Condition
ArgumentOutOfRangeException

The property is set to a value that is less than one.

The value of the MaxJsonLength property applies only when you explicitly create an instance of the JavaScriptSerializer class. Use the jsonSerialization element of the configuration file to set the maximum length for the internal serializer instance that is used by the asynchronous communication layer. For more information about the configuration elements for serialization, see How to: Configure ASP.NET Services in Microsoft Ajax.

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Posted by 굥쓰
Study/Bookmark2011. 7. 8. 09:41
 

Server Error in ‘/’ Application.

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Source Error: 


처음 이 에러를 만났을 때... 아.. 큰일이다 싶었는데, 해결 하고 나니 후련하다. ㅎㅎ

일반적인 상황에선 데이터 초과할 일이 없겠으나, 한 페이지에 대량의 데이터를 불러오는 경우

웹 사이트의 web.config 를 뒤져서 직접 수정 해도 되겠으나

프로젝트 내에 구현 하는 것이 여러모로 정신 건강에 도움이 됨.. ^^

출처 : http://brianreiter.org/2011/01/03/custom-jsonresult-class-for-asp-net-mvc-to-avoid-maxjsonlength-exceeded-exception/
Posted by 굥쓰