powered by simpleCommunicator - 2.0.41     © 2025 Programmizd 02
Форумы / WCF, Web Services, Remoting [игнор отключен] [закрыт для гостей] / WCF - MaxItemsInObjectGraph или как это увеличить
2 сообщений из 2, страница 1 из 1
WCF - MaxItemsInObjectGraph или как это увеличить
    #38261228
KotBazilioZP
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
В общем целый год было клево...хотя пришлось дважды подымать размер максимального сообщения на клиенте.
И вдруг - нежданчик:
GetClient = Неправильный результат из-за исключения, возникшего во время операции. См. описание исключения в InnerException.
GetClient = Форматтер сгенерировал исключение при попытке десериализовать сообщение: Ошибка десериализации параметра http://tempuri.org/:GetClientsListResult. Сообщение InnerException было "Максимальное число объектов, которые могут быть сериализованы или десериализованы в графе объекте, равно "65536". Измените граф объекта или увеличьте квоту MaxItemsInObjectGraph. ". Подробнее см. InnerException.

Ну гугл мне в помощь!!! И сразу решения посыпались...прошло 8 часов а эта ......... отвечает все так же...

сервер:
Код: c#
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.
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IService1" closeTimeout="00:01:00" openTimeout="00:01:00"
                 receiveTimeout="00:20:00" sendTimeout="00:20:00"
                 allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                 maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                 messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="UserName" algorithmSuite="Default"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
        
      </serviceBehaviors>
      
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>



клиент:
Код: c#
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.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
<bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService1" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="BasicHttpBinding_IService3" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
  

        <client>
            <endpoint address="..../Service1.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
                contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />
            <endpoint address="..../Service3.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService3"
                contract="ServiceReference2.IService3" name="BasicHttpBinding_IService3" />
        </client>
  
  <behaviors>
    <endpointBehaviors>
      <behavior name="">
        <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
      </behavior>

    </endpointBehaviors>
  </behaviors>



и даже такое прилепил в коде сервиса:
Код: c#
1.
2.
3.
 [ServiceBehavior(MaxItemsInObjectGraph = 2147483647)]
    public class Service1 : IService1
    {


А оно никак...
...
Рейтинг: 0 / 0
WCF - MaxItemsInObjectGraph или как это увеличить
    #38261318
KotBazilioZP
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Доброе утро!
И оно таки доброе!!!
В общем - с помощью гугла и такой то матери удалось решить проблему - вчера ночью комбинируя разные варианты немного зевнул один факт - ошибка была о десериализации - а значит таки клиент косячил.

Конфиг на сервере не менял, просто клиент не хватал энд поинт и я немного подпилял конфиг на стороне клиента.
Для тех кому дядя Гейтц и Ко тоже вынесли мозги - рабочий вариант:
Код: c#
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.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
<bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService1" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="BasicHttpBinding_IService3" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
  

        <client>
            <endpoint address=".../Service1.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
                contract="ServiceReference1.IService1" 
                      behaviorConfiguration="largeDataBehaviorClient"
                      name="BasicHttpBinding_IService1" />
            <endpoint address=".../Service3.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService3"
                contract="ServiceReference2.IService3"
                      behaviorConfiguration="largeDataBehaviorClient"
                      name="BasicHttpBinding_IService3" />
        </client>
  
  <behaviors>
    <endpointBehaviors>
      <behavior name="largeDataBehaviorClient">
        <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
      </behavior>

    </endpointBehaviors>
  </behaviors>
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / WCF, Web Services, Remoting [игнор отключен] [закрыт для гостей] / WCF - MaxItemsInObjectGraph или как это увеличить
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]