2010-01-19 3 views
2

나는 16k의 독자 할당량을 초과하는 mex 바인딩을 가지고 있습니다. basicHttpBindings의 크기를 늘리는 방법을 알고 있지만 mexHttpBinding은 버퍼 크기 등의 증가를 허용하지 않습니다.WCF mex too too

서비스를 더 작은 서비스로 나눌 수는 없습니다. 우리의 프로덕션 서버가 비즈니스 로직 및 데이터 처리를 처리하더라도 우리 웹 사이트는 요청을 처리해야하기 때문에 우리는 IIS6만을 사용하기 때문에 사용자 지정 라우팅 서비스를 작성해야했습니다.

누구나 mex 파일에 허용되는 크기를 늘릴 수있는 해결책을 제안 할 수 있습니까? 여기

는 실제 오류입니다 :

Error: Cannot obtain Metadata from http://localhost:8021/mex If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:8021/mex Metadata contains a reference that cannot be resolved: ' http://localhost:8021/mex '. There is an error in XML document (1, 148711). The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 148711.HTTP GET Error URI: http://localhost:8021/mex There was an error downloading ' http://localhost:8021/mex '. The request failed with HTTP status 400: Bad Request.

+0

에 설명 된대로 그는, 설정 파일을 생성하여 대체 할 수 있습니다 지정된없는거야? – Tanner

+0

svcutil을 사용하고 있습니까? 그렇다면 아래를보십시오. – Tanner

답변

1

시도하여 MEX 끝점 바인딩 사용자 정의 다음

<customBinding> 
<binding name="customMex"> 
     <textMessageEncoding> 
    <readerQuotas maxDepth="2147483647" 
     maxStringContentLength="2147483647" 
     maxArrayLength="2147483647" 
     maxBytesPerRead="2147483647" 
     maxNameTableCharCount="2147483647" /> 
     </textMessageEncoding> 
    <httpTransport transferMode="Buffered" 
     maxReceivedMessageSize="2147483647" 
     maxBufferSize="2147483647"/> 
</binding> 

당신은 당신이 좋아하는 경우 크기를 수정하고 바인딩을 참조 할 수 있습니다 다음과 같은 끝 점이 있습니다.

<endpoint address="mex" 
    binding="customBinding" 
    contract="IMetadataExchange" 
    name="" 
    bindingConfiguration="customMex" 
    listenUriMode="Explicit" /> 

는 svcutil 구성 무시

이는 svcutil을 사용하는 경우, 그것은 자신의 한계 당신이 아래 customBinding를 시도이 Geeks With Blogs Article

+0

안녕하세요. 나는 당신의 방법을 시도했지만 그것이 내가 필요로하는 것을하지 않았습니다. 내 글에서 편집 한 내용을 보면 제안 된 수정 사항 이후에 나타나는 오류를 반영합니다. – Johannes

관련 문제