<form id="sampleForm" runat="server" action="proc.aspx" method="post">...</form>
티스토리 뷰
서버 폼을 포함한 ASP.NET 페이지에서 다른 페이지로 전송할 때가 있다.
form.aspx
-------------------------------------------------------------------
-------------------------------------------------------------------------------
이와 같이 실행하게 되면 proc.aspx 페이지에서 다음과 같은 오류를 만나게 된다.
Server Error in ‘/’ Application.
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
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.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
아직은 .NET Framework를 많이 사용해보지 못해서 그런지 당황스러울 때가 있다.
단일 서버를 사용 중인데 이와 같은 오류 메시지는 더욱 그러하다.
이런 오류를 해결하기 위해서는 데이터를 받는 페이지에서는 ViewState Mac을 검사하지 않도록 해주면 된다.
proc.aspx
-------------------------------------------------------------------------
-------------------------------------------------------------------------------------
물론 web.config 파일에서 <pages enableViewStateMac=”false”/> 와 지정할 수도 있다.
자료
- Total
- Today
- Yesterday
- God of War III
- 나를 기억하고 있는 너에게
- Lily's Diary
- 보이스차
- 모토스톰2
- 러브트리프로젝트
- 보이스티
- 닷넷 파일형식
- 삼성 외장하드
- 아이폰 보조배터리
- hot 6
- KL-2200
- 아이폰 셀카
- 닷넷 엑셀
- 릴리스다이어리
- GTO SHONAN 14DAYS
- 켄우드 정수기
- IT·컴퓨터
- 아이튠즈 없이 mp3가져오기
- georgia max
- 아이폰 카메라어플
- Crows Zero
- 아이팟 보조배터리
- 로네펠트
- 안녕 바다
- 윈터드림
- .NET Excel
- KL2200
- Roibosh Vanilla
- 릴리스 다이어리 - 설레어
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |