Microsoft MVP성태의 닷넷 이야기
WCF에서 maxItemsInObjectGraph 오류 관련 질문드립니다. [링크 복사], [링크+제목 복사],
조회: 18965
글쓴 사람
채동민
홈페이지
첨부 파일
 

안녕하세요. 삼성중공업 채동민입니다. 직장 옮기셨다죠. 잘 지내시는지요?

wcf 통신중 MaxItemsInObjectGraph관련 오류가 생겼는데 원인을 찾기 힘들어서 질문드려요.

------------------------------------ 오류내용
Event Type: Error
Event Source: HSServer
Event Category: None
Event ID: 0
Date: 4/19/2010
Time: 7:39:39 PM
User: N/A
Computer: MSDHS
Description:
tickTimer_Elapsed(HS) - DaqServer.GetValue/GetChange
MSDHS ? mscorlib ?? ??? ???????.

ErrorMessage : The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:GetChangesResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. '. Please see InnerException for more details.

Server stack trace:

Exception rethrown at [0]:
at IAS.ServiceRef.DaqServiceRef.IDaqService.GetChanges()
at IAS.ServiceRef.DaqServiceRef.DaqServiceClient.GetChanges() in d:\work\iaspackage\IASPackage\Dailybuild_Release_Msdcore\Sources\IAS_Solution_2006_10_12\ServiceInterfaceProjects\IAS.ServiceRef\Service References\DaqServiceRef\Reference.cs:line 1550
at HSServiceLibrary.TagHistoryProcess.tickTimer_Elapsed(Object sender, ElapsedEventArgs e) in d:\work\iaspackage\IASPackage\Dailybuild_Release_Msdcore\Sources\IAS_Solution_2006_10_12\ServiceInterfaceProjects\IAS.HSService\History\TagHistoryProcess.cs:line 291
-----------------------------------------------------
ErrorMessage : Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota.
at ReadArrayOfItemTFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )

------------------------------------------------------------------------------------------------------------------
app.config 상의 maxItemsInObjectGraph 필드는 아래와 같이 충분히 큰데 65536을 넘는다는 오류가 뜨는군요.

<behaviors>
<serviceBehaviors>
<behavior name="HSServiceLibrary.ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceThrottling maxConcurrentSessions="50"/>
</behavior>
</serviceBehaviors>
</behaviors>

안녕히 계세요..








[최초 등록일: ]
[최종 수정일: 5/19/2010]


비밀번호

댓글 작성자
 



2010-04-21 01시14분
넵. 저는 잘 지내고 있습니다. ^^

음... 보내주신 거는... 예외 메시지의 콜스택을 보아하니 클라이언트 측에서 호출한 것이 오류가 발생하는 것인데요.
반면 app.config 에서는 serviceBehaviors로 해서 서비스 측에 적용되는 설정값을 보여주고 있습니다. 그렇다면 오류가 발생하는 것이 맞습니다.

클라이언트 측에 설정값이 적용되려면 endpointBehaviors 에 설정이 되어야 합니다.

<behaviors>
<serviceBehaviors>
</serviceBehaviors>
<endpointbehaviors>
<behavior name="myBehavior">
<datacontractserializer maxitemsinobjectgraph="2147483647" />
</behavior>
</endpointbehaviors>
</behaviors>

kevin25
2010-05-16 05시59분
[누굴까~~요?^^] 예서 채선임님도 뵙네요...
반갑습니다.
[guest]

... 91  92  93  [94]  95  96  97 
NoWriterDateCnt.TitleFile(s)
111정성태3/19/20059741    답변글 [답변]: 닷넷 프레임워크 배포
107안연준3/17/20058983[-_-]스마트 클라이언트에 관련 된 질문[-_-]
110정성태3/19/20059827    답변글 [답변]: [-_-]스마트 클라이언트에 관련 된 질문[-_-]
116안연준3/21/20059386        답변글 [답변]: 친절한 답변 고맙습니다.
98김용국3/18/200511159정성태님... 연결이 준비됬습니다
99정성태3/2/200512028    답변글 [답변]: 정성태님... 연결이 준비됬습니다
100김용국3/18/20058875        답변글 [답변]: 죄송합니다! 급히올리느라 file path의 변경을 하지않고 그냥올렸네요....!
101정성태3/2/20059121            답변글 [답변]: [답변]: 죄송합니다! 급히올리느라 file path의 변경을 하지않고 그냥올렸네요....!
102김용국3/18/20059179                답변글 [답변]: 거듭죄송하네요..... 후~~~주소를 변경하고 빌드를 다시 했습니다....
103정성태3/2/20059048                    답변글 [답변]: [답변]: 거듭죄송하네요..... 후~~~주소를 변경하고 빌드를 다시 했습니다....
104김용국3/2/20059282                        답변글 [답변]: 네... 빨리 검토해 봐 주셔서 감사합니다~~
105정성태3/2/20058518                            답변글 [답변]: [답변]: 네... 빨리 검토해 봐 주셔서 감사합니다~~
106김용국3/2/20059004                                답변글 [답변]: 답변감사합니다!
91김용국2/28/200510827IE에 WindowsFormControl을 올려 실행하면 이런에러가 나네요???파일 다운로드1
92정성태2/28/200512121    답변글 [답변]: IE에 WindowsFormControl을 올려 실행하면 이런에러가 나네요???
93김용국2/28/200511061        답변글 [답변]: 답변감사합니다... 재질문을 드립니다
94정성태2/28/200511650            답변글 [답변]: [답변]: 답변감사합니다... 재질문을 드립니다
95김용국2/28/200511723                답변글 [답변]: IE주소창에서 해당주소로 실행을 해보니....디버깅 PopUp화면이...^
96정성태2/28/200510786                    답변글 [답변]: [답변]: IE주소창에서 해당주소로 실행을 해보니....디버깅 PopUp화면이...^
97김용국3/1/200511303                        답변글 [답변]: 준비되는데로 말씀드리겠습니다 ^^
88안지환2/22/200512829^^ 사이트 잘 들러보았습니다.
89정성태2/22/200512826    답변글 [답변]: ^^ 사이트 잘 들러보았습니다.
85한기열2/22/200511440정성태님 홈같은 부드러운 페이지 넘김?은 어떻게 구현하나요?
86정성태2/22/200512120    답변글 [답변]: 정성태님 홈같은 부드러운 페이지 넘김?은 어떻게 구현하나요? [2]
84김용국2/21/200512217Smart Client에 관한 문의 드립니다.
87정성태2/22/200512278    답변글 [답변]: Smart Client에 관한 문의 드립니다.
... 91  92  93  [94]  95  96  97