+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Exporting subscribers

Exporting subscribers

5 posts, 0 answered
  1. Gooya
    Gooya avatar
    23 posts
    Registered:
    11 May 2010
    18 Mar 2013
    Link to this post
    I'm trying to export subscribers at /Sitefinity/Email%20Campaigns/Subscribers . I click export button, dialog opens, and on "OK" button click there is no feedback. The error log shows:
    Type : System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : 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.
    Source : System.Runtime.Serialization
    Help link :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void IncrementItemCount(Int32)
    Stack Trace :    at System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(Int32 count)
       at WriteMailingListViewModelToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , ClassDataContract , XmlDictionaryString[] )
       at System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteArrayOfMailingListViewModelToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , CollectionDataContract )
       at System.Runtime.Serialization.Json.JsonCollectionDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteSubscriberViewModelToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , ClassDataContract , XmlDictionaryString[] )
       at System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteArrayOfSubscriberViewModelToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , CollectionDataContract )
       at System.Runtime.Serialization.Json.JsonCollectionDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteCollectionContextOfSubscriberViewModelf_PzHzhL5ToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , ClassDataContract , XmlDictionaryString[] )
       at System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph)
       at System.Runtime.Serialization.XmlObjectSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
       at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
       at System.ServiceModel.Dispatcher.SingleBodyParameterMessageFormatter.SingleParameterBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.BodyWriter.WriteBodyContents(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.BodyWriterMessage.OnWriteBodyContents(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.Message.OnWriteMessage(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.Message.WriteMessage(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message message, BufferManager bufferManager, Int32 initialOffset, Int32 maxSizeQuota)
       at System.ServiceModel.Channels.JsonMessageEncoderFactory.JsonMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
       at System.ServiceModel.Channels.WebMessageEncoderFactory.WebMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
       at System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message)
       at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
       at System.ServiceModel.Channels.HttpRequestContext.OnReply(Message message, TimeSpan timeout)
       at System.ServiceModel.Activation.HostedHttpContext.OnReply(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)
     
    Additional Info:
     
    MachineName : WWW
    TimeStamp : 3/18/2013 12:33:01 PM
    FullName : Telerik.Sitefinity.Utilities, Version=5.2.3800.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
    AppDomainName : /LM/W3SVC/191816650/Root-1-130080040452500000
    ThreadIdentity :
    WindowsIdentity : NT AUTHORITY\NETWORK SERVICE
     
     
    Category: ErrorLog
     
    Priority: 0
     
    EventId: 90000
     
    Severity: Error
     
    Title:Enterprise Library Exception Handling
     
    Machine: WWW
     
    App Domain: /LM/W3SVC/191816650/Root-1-130080040452500000
     
    ProcessId: 9364
     
    Process Name: c:\windows\system32\inetsrv\w3wp.exe
     
    Thread Name:
     
    Win32 ThreadId:2624

    I tried to change servicebehavior, but there is no behavior for SubscriberService, nor service definition in web.config.
    I added one like this:
     <behavior name="Telerik.Sitefinity.Modules.Newsletters.Services.SubscriberServiceBehavior">
              <enableWebScript />
              <dataContractSerializer maxItemsInObjectGraph="200000000"/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <services>
          <service name="Telerik.Sitefinity.Modules.Newsletters.Services.SubscriberService">
            <endpoint behaviorConfiguration="Telerik.Sitefinity.Modules.Newsletters.Services.SubscriberServiceBehavior" address="" binding="webHttpBinding" contract="Telerik.Sitefinity.Modules.Newsletters.Services.SubscriberService" ></endpoint>
          </service>
    But then /Sitefinity/Services/Newsletters/Subscriber.svc/ does not load: 
    The contract name 'Telerik.Sitefinity.Modules.Newsletters.Services.SubscriberService' could not be found in the list of contracts implemented by the service 'SubscriberService'.

    I'm using sitefinity 5.2 on iis6, windows server 2003sp2


  2. Gooya
    Gooya avatar
    1 posts
    Registered:
    06 Dec 2012
    18 Mar 2013
    Link to this post
    Adding next code to machine.config worked, but I still want to know how to change this configuration per site(in web.config).
    <system.serviceModel>
     <commonBehaviors>
      <endpointBehaviors>
       <dataContractSerializer maxItemsInObjectGraph="200000000" />
      </endpointBehaviors>
      <serviceBehaviors>
       <dataContractSerializer maxItemsInObjectGraph="200000000" />
      </serviceBehaviors>
     </commonBehaviors>
    </system.serviceModel>
  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    21 Mar 2013
    Link to this post
    Hi,

    You can try and set the same code in your webconfig file, after the opening <system.serviceModel> tag:

    <commonBehaviors>
      <endpointBehaviors>
       <dataContractSerializer maxItemsInObjectGraph="200000000" />
      </endpointBehaviors>
      <serviceBehaviors>
       <dataContractSerializer maxItemsInObjectGraph="200000000" />
      </serviceBehaviors>
     </commonBehaviors>

    it should have the same effect on your project, as putting it in the machine.config file.

    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Gooya
    Gooya avatar
    23 posts
    Registered:
    11 May 2010
    21 Mar 2013 in reply to Victor Velev
    Link to this post
    thank you for answer, but this code can only exists in machine.config, otherwise exceptions occurs:
     it is an error to use a section registered as allowdefinition='machinetoapplication' beyond application level
  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    26 Mar 2013
    Link to this post
    Hi Mitja,

    If you encounter the above error, please check the following articles, which suggest solutions for resolving it:

    http://scottonwriting.net/sowblog/archive/2010/02/17/163375.aspx


    http://stackoverflow.com/questions/1712629/section-registered-as-allowdefinition-machinetoapplication-beyond-application


    http://stackoverflow.com/questions/2355947/error-allowdefinition-machinetoapplication-beyond-application-level


    http://stackoverflow.com/questions/9300927/error-to-use-a-section-registered-as-allowdefinition-machinetoapplication-beyo


    Regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
5 posts, 0 answered