2013-09-05 4 views
0

asp.net 2.0에서 응용 프로그램을 개발 중입니다. 한 가지 형태로 버튼이 있고 데이터베이스에 데이터를 삽입하는 클릭을합니다. 삽입 후 이제 Bowser 새로 고침 버튼을 클릭하면 다음 오류가 발생합니다. 사전에ASP.NET의 브라우저 새로 고침 오류

Refresh detected 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: Refresh detected

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Refresh detected]
WebTemplate.Template.RefreshProtectModule.appl_AcquireRequestState(Object source, EventArgs e) +351
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

감사합니다 ..

답변

0

는 새로 고침을 때리는 실제로 다시 데이터를 삽입 할 수있는 버튼을 클릭하는 것과 동일합니다. 버튼 클릭 이벤트는 사용자를 새 페이지로 리디렉션해야합니다.

0

분명히 새로 고침을 허용하지 않는 "RefreshProtectModule"이라는 것을 사용하고 있습니다. 한 편으로는 좋은 일입니다. 그렇지 않으면 폼이 새로 고침 할 때마다 DB에 레코드를 삽입합니다. 다른 한편에서는 "Refresh detected"예외를 처리하고 그것을 우아하게 처리해야합니다.

+0

답장을 보내 주셔서 감사합니다. "Refresh detected"를 처리하고 요청을 보류하는 더 좋은 방법을 제안 할 수 있습니까? – BABA

+0

죄송합니다.이 모듈에 익숙하지 않아 사용자 정의가 될 수 있습니다. 웹 사이트 설정을 확인하고 설치해야하는 사람과 이야기하십시오. –

관련 문제