locked
Receiving Type in Assembly is not marked as serializable error RRS feed

  • Question

  • User-523892225 posted

    When I click on a link I get the following error:

    Type 'QNet.ServiceRequest.DataContracts.IntakeServiceRequest' in Assembly 'QNet.ServiceRequest.DataContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable. 
      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.Runtime.Serialization.SerializationException: Type 'QNet.ServiceRequest.DataContracts.IntakeServiceRequest' in Assembly 'QNet.ServiceRequest.DataContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
    
    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: 
    
    
    
    [SerializationException: Type 'QNet.ServiceRequest.DataContracts.IntakeServiceRequest' in Assembly 'QNet.ServiceRequest.DataContracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.]
       System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +7745307
       System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +258
       System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +111
       System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +422
       System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51
       System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +410
       System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134
       System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13
       System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +845
    
    [ArgumentException: Error serializing value 'QNet.ServiceRequest.DataContracts.IntakeServiceRequest' of type 'QNet.ServiceRequest.DataContracts.IntakeServiceRequest.']
       System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3395
       System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +110
       System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57
       System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4
       System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37
       System.Web.UI.HiddenFieldPageStatePersister.Save() +79
       System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +105
       System.Web.UI.Page.SaveAllState() +236
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1099
    
     
    

    I confused because when I go to the page it talks of, it is clearly marked as WCFSerialization so I'm unsure of what it's speaking of or what it's looking for. I've stepped through the code hoping that it would fail on a particular line but it does not. Here is the code

    //------------------------------------------------------------------------------
    // <auto-generated>
    //     This code was generated by a tool.
    //
    //     Changes to this file may cause incorrect behavior and will be lost if
    //     the code is regenerated.
    // </auto-generated>
    //------------------------------------------------------------------------------
    
    using System;
    using WcfSerialization = global::System.Runtime.Serialization;
    
    namespace QNet.ServiceRequest.DataContracts
    {
    	/// <summary>
    	/// Data Contract Class - IntakeServiceRequest
    	/// </summary>
    	[WcfSerialization::DataContract(Namespace = "urn:QNet.ServiceRequest.DataContract", Name = "IntakeServiceRequest")]
    	public partial class IntakeServiceRequest 
    	{
    		private System.Guid intakeServiceId;
    		private int activeFlag;
    		private string serviceRequestNumber;
    		private string narrative;
    		private string title;
    		private string description;
    		private System.Nullable<System.DateTime> reportedDate;
    		private System.Nullable<System.DateTime> reportedTime;
    		private string reportedArea;
    		private string sourceArea;
    		private string inputTypeValue;
    		private string crossReferenceWith;
    		private System.Nullable<System.DateTime> statusChangeDate;
    		private string statusChangeDescription;
    		private System.Nullable<int> dangerLevel;
    		private string dangerReason;
    		private bool accessLevel;
    		private string updatedbyField;
    		private System.Nullable<System.DateTime> updatedonField;
    		private string insertedbyField;
    		private System.Nullable<System.DateTime> insertedonField;
    		private System.Nullable<System.DateTime> archiveOn;
    		private string archiveBy;
    		private byte[] timestampField;
    		private System.DateTime effectiveDate;
    		private System.Nullable<System.DateTime> expirationDate;
    		private string serviceRequestIncidentTypeKey;
    		private string reportedTypeKey;
    		private System.Nullable<bool> reportedBySelf;
    		private System.Nullable<bool> suspiciousDeath;
    		private System.Nullable<bool> missingPersons;
    		private System.Nullable<bool> sharedCareTaxCredit;
    		private System.Nullable<int> sharedCareTaxCreditYear;
    		private string agencyName;
    		private string notes;
    		private System.Nullable<bool> externalAgencyPhone;
    		private System.Nullable<bool> externalAgencyFax;
    		private System.Nullable<bool> externalAgencyEmail;
    		private System.Nullable<bool> investigatable;
    		private string visitInfo;
    		private IntakeSerReqStatusType intakeSerReqStatusType;
    		private System.Guid intakeSerReqStatusTypeId;
    		private IntakeServiceRequestInputType intakeServiceRequestInputType;
    		private System.Guid intakeServReqInputTypeId;
    		private IntakeServiceRequestType intakeServiceRequestType;
    		private System.Guid intakeServReqTypeId;
    		private Priority priority;
    		private System.Guid priorityId;
    		private ServiceRequestSubType serviceRequestSubType;
    		private System.Guid serviceRequestSubTypeId;
    		private System.Collections.Generic.List<IntakeServiceRequestAgency> intakeServiceRequestAgency;
    		private System.Collections.Generic.List<IntakeServiceRequestCustomForm> intakeServiceRequestCustomForm;
    		private System.Collections.Generic.List<IntakeServiceRequestDetail> intakeServiceRequestDetail;
    		private System.Collections.Generic.List<IntakeServiceRequestNatureCode> intakeServiceRequestNatureCode;
    		private System.Collections.Generic.List<IntakeServiceRequestQuestionAnswer> intakeServiceRequestQuestionAnswer;
    		private System.Collections.Generic.List<IntakeServiceRequestReason> intakeServiceRequestReason;
    		private System.Collections.Generic.List<IntakeServiceRequestReview> intakeServiceRequestReview;
    		private System.Collections.Generic.List<IntakeServiceRequestService> intakeServiceRequestService;
    		private System.Collections.Generic.List<AreaTeamMemberServiceRequest> areaTeamMemberServiceRequest;
    		private System.Collections.Generic.List<IntakeServiceRequestUserAccess> intakeServiceRequestUserAccess;
    		private System.Collections.Generic.List<IntakeServiceRequestHistory> intakeServiceRequestHistory;
    		private System.Collections.Generic.List<IntakeServiceRequestDispositionCode> intakeServiceRequestDispositionCode;
    		private System.Collections.Generic.List<IntakeServiceRequestGroupDetails> intakeServiceRequestGroupDetails;
    		private System.Collections.Generic.List<Investigation> investigation;
    		private System.Collections.Generic.List<IntakeServiceRequestClearingData> intakeServiceRequestClearingData;
    		private System.Collections.Generic.List<IntakeServiceRequestReferralDetail> intakeServiceRequestReferralDetail;
    		private System.Collections.Generic.List<IntakeServiceRequestWeaver> intakeServiceRequestWeaver;
    		private System.Nullable<bool> illegalActivity;
    		private string intakeServiceRequestIllegalActivityTypeKey;
    		private System.Collections.Generic.List<IntakeServiceRequestActor> intakeServiceRequestActor;
    		private System.Collections.Generic.List<IntakeServiceRequestCrossReference> intakeServiceRequestCrossReference;
    		private System.Collections.Generic.List<IntakeServiceRequestIllegalActivity> intakeServiceRequestIllegalActivity;
    		private System.Collections.Generic.List<IntakeServiceRequestCorrection> intakeServiceRequestCorrection;
    		private System.Nullable<System.DateTime> targetCompleteDate;
    		private System.Nullable<bool> supervisorReview;
    		private System.Nullable<bool> rARejectedMedicaidStatus;
    		private System.Nullable<bool> moneyFollowsPerson;
    		private System.Nullable<System.DateTime> iM54ADate;
    		private System.Nullable<bool> hCB;
    		private System.Nullable<System.DateTime> adverseActionDate;
    		private System.Nullable<System.DateTime> applicationHearingReceivedDate;
    		private System.Nullable<System.DateTime> reversalAdverseActionDate;
    		private string mONumber;
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceId", IsRequired = false, Order = 0)]
    		public System.Guid IntakeServiceId
    		{
    		  get { return intakeServiceId; }
    		  set { intakeServiceId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ActiveFlag", IsRequired = false, Order = 1)]
    		public int ActiveFlag
    		{
    		  get { return activeFlag; }
    		  set { activeFlag = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ServiceRequestNumber", IsRequired = false, Order = 2)]
    		public string ServiceRequestNumber
    		{
    		  get { return serviceRequestNumber; }
    		  set { serviceRequestNumber = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Narrative", IsRequired = false, Order = 3)]
    		public string Narrative
    		{
    		  get { return narrative; }
    		  set { narrative = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Title", IsRequired = false, Order = 4)]
    		public string Title
    		{
    		  get { return title; }
    		  set { title = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Description", IsRequired = false, Order = 5)]
    		public string Description
    		{
    		  get { return description; }
    		  set { description = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReportedDate", IsRequired = false, Order = 6)]
    		public System.Nullable<System.DateTime> ReportedDate
    		{
    		  get { return reportedDate; }
    		  set { reportedDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReportedTime", IsRequired = false, Order = 7)]
    		public System.Nullable<System.DateTime> ReportedTime
    		{
    		  get { return reportedTime; }
    		  set { reportedTime = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReportedArea", IsRequired = false, Order = 8)]
    		public string ReportedArea
    		{
    		  get { return reportedArea; }
    		  set { reportedArea = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "SourceArea", IsRequired = false, Order = 9)]
    		public string SourceArea
    		{
    		  get { return sourceArea; }
    		  set { sourceArea = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "InputTypeValue", IsRequired = false, Order = 10)]
    		public string InputTypeValue
    		{
    		  get { return inputTypeValue; }
    		  set { inputTypeValue = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "CrossReferenceWith", IsRequired = false, Order = 11)]
    		public string CrossReferenceWith
    		{
    		  get { return crossReferenceWith; }
    		  set { crossReferenceWith = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "StatusChangeDate", IsRequired = false, Order = 12)]
    		public System.Nullable<System.DateTime> StatusChangeDate
    		{
    		  get { return statusChangeDate; }
    		  set { statusChangeDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "StatusChangeDescription", IsRequired = false, Order = 13)]
    		public string StatusChangeDescription
    		{
    		  get { return statusChangeDescription; }
    		  set { statusChangeDescription = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "DangerLevel", IsRequired = false, Order = 14)]
    		public System.Nullable<int> DangerLevel
    		{
    		  get { return dangerLevel; }
    		  set { dangerLevel = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "DangerReason", IsRequired = false, Order = 15)]
    		public string DangerReason
    		{
    		  get { return dangerReason; }
    		  set { dangerReason = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "AccessLevel", IsRequired = false, Order = 16)]
    		public bool AccessLevel
    		{
    		  get { return accessLevel; }
    		  set { accessLevel = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "updatedby", IsRequired = false, Order = 17)]
    		public string updatedby
    		{
    		  get { return updatedbyField; }
    		  set { updatedbyField = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "updatedon", IsRequired = false, Order = 18)]
    		public System.Nullable<System.DateTime> updatedon
    		{
    		  get { return updatedonField; }
    		  set { updatedonField = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "insertedby", IsRequired = false, Order = 19)]
    		public string insertedby
    		{
    		  get { return insertedbyField; }
    		  set { insertedbyField = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "insertedon", IsRequired = false, Order = 20)]
    		public System.Nullable<System.DateTime> insertedon
    		{
    		  get { return insertedonField; }
    		  set { insertedonField = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ArchiveOn", IsRequired = false, Order = 21)]
    		public System.Nullable<System.DateTime> ArchiveOn
    		{
    		  get { return archiveOn; }
    		  set { archiveOn = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ArchiveBy", IsRequired = false, Order = 22)]
    		public string ArchiveBy
    		{
    		  get { return archiveBy; }
    		  set { archiveBy = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "timestamp", IsRequired = false, Order = 23)]
    		public byte[] timestamp
    		{
    		  get { return timestampField; }
    		  set { timestampField = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "EffectiveDate", IsRequired = false, Order = 24)]
    		public System.DateTime EffectiveDate
    		{
    		  get { return effectiveDate; }
    		  set { effectiveDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ExpirationDate", IsRequired = false, Order = 25)]
    		public System.Nullable<System.DateTime> ExpirationDate
    		{
    		  get { return expirationDate; }
    		  set { expirationDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ServiceRequestIncidentTypeKey", IsRequired = false, Order = 26)]
    		public string ServiceRequestIncidentTypeKey
    		{
    		  get { return serviceRequestIncidentTypeKey; }
    		  set { serviceRequestIncidentTypeKey = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReportedTypeKey", IsRequired = false, Order = 27)]
    		public string ReportedTypeKey
    		{
    		  get { return reportedTypeKey; }
    		  set { reportedTypeKey = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReportedBySelf", IsRequired = false, Order = 28)]
    		public System.Nullable<bool> ReportedBySelf
    		{
    		  get { return reportedBySelf; }
    		  set { reportedBySelf = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "SuspiciousDeath", IsRequired = false, Order = 29)]
    		public System.Nullable<bool> SuspiciousDeath
    		{
    		  get { return suspiciousDeath; }
    		  set { suspiciousDeath = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "MissingPersons", IsRequired = false, Order = 30)]
    		public System.Nullable<bool> MissingPersons
    		{
    		  get { return missingPersons; }
    		  set { missingPersons = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "SharedCareTaxCredit", IsRequired = false, Order = 31)]
    		public System.Nullable<bool> SharedCareTaxCredit
    		{
    		  get { return sharedCareTaxCredit; }
    		  set { sharedCareTaxCredit = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "SharedCareTaxCreditYear", IsRequired = false, Order = 32)]
    		public System.Nullable<int> SharedCareTaxCreditYear
    		{
    		  get { return sharedCareTaxCreditYear; }
    		  set { sharedCareTaxCreditYear = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "AgencyName", IsRequired = false, Order = 33)]
    		public string AgencyName
    		{
    		  get { return agencyName; }
    		  set { agencyName = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Notes", IsRequired = false, Order = 34)]
    		public string Notes
    		{
    		  get { return notes; }
    		  set { notes = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ExternalAgencyPhone", IsRequired = false, Order = 35)]
    		public System.Nullable<bool> ExternalAgencyPhone
    		{
    		  get { return externalAgencyPhone; }
    		  set { externalAgencyPhone = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ExternalAgencyFax", IsRequired = false, Order = 36)]
    		public System.Nullable<bool> ExternalAgencyFax
    		{
    		  get { return externalAgencyFax; }
    		  set { externalAgencyFax = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ExternalAgencyEmail", IsRequired = false, Order = 37)]
    		public System.Nullable<bool> ExternalAgencyEmail
    		{
    		  get { return externalAgencyEmail; }
    		  set { externalAgencyEmail = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Investigatable", IsRequired = false, Order = 38)]
    		public System.Nullable<bool> Investigatable
    		{
    		  get { return investigatable; }
    		  set { investigatable = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "VisitInfo", IsRequired = false, Order = 39)]
    		public string VisitInfo
    		{
    		  get { return visitInfo; }
    		  set { visitInfo = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeSerReqStatusType", IsRequired = false, Order = 40)]
    		public IntakeSerReqStatusType IntakeSerReqStatusType
    		{
    		  get { return intakeSerReqStatusType; }
    		  set { intakeSerReqStatusType = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeSerReqStatusTypeId", IsRequired = false, Order = 41)]
    		public System.Guid IntakeSerReqStatusTypeId
    		{
    		  get { return intakeSerReqStatusTypeId; }
    		  set { intakeSerReqStatusTypeId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestInputType", IsRequired = false, Order = 42)]
    		public IntakeServiceRequestInputType IntakeServiceRequestInputType
    		{
    		  get { return intakeServiceRequestInputType; }
    		  set { intakeServiceRequestInputType = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServReqInputTypeId", IsRequired = false, Order = 43)]
    		public System.Guid IntakeServReqInputTypeId
    		{
    		  get { return intakeServReqInputTypeId; }
    		  set { intakeServReqInputTypeId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestType", IsRequired = false, Order = 44)]
    		public IntakeServiceRequestType IntakeServiceRequestType
    		{
    		  get { return intakeServiceRequestType; }
    		  set { intakeServiceRequestType = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServReqTypeId", IsRequired = false, Order = 45)]
    		public System.Guid IntakeServReqTypeId
    		{
    		  get { return intakeServReqTypeId; }
    		  set { intakeServReqTypeId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Priority", IsRequired = false, Order = 46)]
    		public Priority Priority
    		{
    		  get { return priority; }
    		  set { priority = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "PriorityId", IsRequired = false, Order = 47)]
    		public System.Guid PriorityId
    		{
    		  get { return priorityId; }
    		  set { priorityId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ServiceRequestSubType", IsRequired = false, Order = 48)]
    		public ServiceRequestSubType ServiceRequestSubType
    		{
    		  get { return serviceRequestSubType; }
    		  set { serviceRequestSubType = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ServiceRequestSubTypeId", IsRequired = false, Order = 49)]
    		public System.Guid ServiceRequestSubTypeId
    		{
    		  get { return serviceRequestSubTypeId; }
    		  set { serviceRequestSubTypeId = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestAgency", IsRequired = false, Order = 50)]
    		public System.Collections.Generic.List<IntakeServiceRequestAgency> IntakeServiceRequestAgency
    		{
    		  get { return intakeServiceRequestAgency; }
    		  set { intakeServiceRequestAgency = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestCustomForm", IsRequired = false, Order = 51)]
    		public System.Collections.Generic.List<IntakeServiceRequestCustomForm> IntakeServiceRequestCustomForm
    		{
    		  get { return intakeServiceRequestCustomForm; }
    		  set { intakeServiceRequestCustomForm = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestDetail", IsRequired = false, Order = 52)]
    		public System.Collections.Generic.List<IntakeServiceRequestDetail> IntakeServiceRequestDetail
    		{
    		  get { return intakeServiceRequestDetail; }
    		  set { intakeServiceRequestDetail = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestNatureCode", IsRequired = false, Order = 53)]
    		public System.Collections.Generic.List<IntakeServiceRequestNatureCode> IntakeServiceRequestNatureCode
    		{
    		  get { return intakeServiceRequestNatureCode; }
    		  set { intakeServiceRequestNatureCode = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestQuestionAnswer", IsRequired = false, Order = 54)]
    		public System.Collections.Generic.List<IntakeServiceRequestQuestionAnswer> IntakeServiceRequestQuestionAnswer
    		{
    		  get { return intakeServiceRequestQuestionAnswer; }
    		  set { intakeServiceRequestQuestionAnswer = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestReason", IsRequired = false, Order = 55)]
    		public System.Collections.Generic.List<IntakeServiceRequestReason> IntakeServiceRequestReason
    		{
    		  get { return intakeServiceRequestReason; }
    		  set { intakeServiceRequestReason = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestReview", IsRequired = false, Order = 56)]
    		public System.Collections.Generic.List<IntakeServiceRequestReview> IntakeServiceRequestReview
    		{
    		  get { return intakeServiceRequestReview; }
    		  set { intakeServiceRequestReview = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestService", IsRequired = false, Order = 57)]
    		public System.Collections.Generic.List<IntakeServiceRequestService> IntakeServiceRequestService
    		{
    		  get { return intakeServiceRequestService; }
    		  set { intakeServiceRequestService = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "AreaTeamMemberServiceRequest", IsRequired = false, Order = 58)]
    		public System.Collections.Generic.List<AreaTeamMemberServiceRequest> AreaTeamMemberServiceRequest
    		{
    		  get { return areaTeamMemberServiceRequest; }
    		  set { areaTeamMemberServiceRequest = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestUserAccess", IsRequired = false, Order = 59)]
    		public System.Collections.Generic.List<IntakeServiceRequestUserAccess> IntakeServiceRequestUserAccess
    		{
    		  get { return intakeServiceRequestUserAccess; }
    		  set { intakeServiceRequestUserAccess = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestHistory", IsRequired = false, Order = 60)]
    		public System.Collections.Generic.List<IntakeServiceRequestHistory> IntakeServiceRequestHistory
    		{
    		  get { return intakeServiceRequestHistory; }
    		  set { intakeServiceRequestHistory = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestDispositionCode", IsRequired = false, Order = 61)]
    		public System.Collections.Generic.List<IntakeServiceRequestDispositionCode> IntakeServiceRequestDispositionCode
    		{
    		  get { return intakeServiceRequestDispositionCode; }
    		  set { intakeServiceRequestDispositionCode = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestGroupDetails", IsRequired = false, Order = 62)]
    		public System.Collections.Generic.List<IntakeServiceRequestGroupDetails> IntakeServiceRequestGroupDetails
    		{
    		  get { return intakeServiceRequestGroupDetails; }
    		  set { intakeServiceRequestGroupDetails = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "Investigation", IsRequired = false, Order = 63)]
    		public System.Collections.Generic.List<Investigation> Investigation
    		{
    		  get { return investigation; }
    		  set { investigation = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestClearingData", IsRequired = false, Order = 64)]
    		public System.Collections.Generic.List<IntakeServiceRequestClearingData> IntakeServiceRequestClearingData
    		{
    		  get { return intakeServiceRequestClearingData; }
    		  set { intakeServiceRequestClearingData = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestReferralDetail", IsRequired = false, Order = 65)]
    		public System.Collections.Generic.List<IntakeServiceRequestReferralDetail> IntakeServiceRequestReferralDetail
    		{
    		  get { return intakeServiceRequestReferralDetail; }
    		  set { intakeServiceRequestReferralDetail = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestWeaver", IsRequired = false, Order = 66)]
    		public System.Collections.Generic.List<IntakeServiceRequestWeaver> IntakeServiceRequestWeaver
    		{
    		  get { return intakeServiceRequestWeaver; }
    		  set { intakeServiceRequestWeaver = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IllegalActivity", IsRequired = false, Order = 67)]
    		public System.Nullable<bool> IllegalActivity
    		{
    		  get { return illegalActivity; }
    		  set { illegalActivity = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestIllegalActivityTypeKey", IsRequired = false, Order = 68)]
    		public string IntakeServiceRequestIllegalActivityTypeKey
    		{
    		  get { return intakeServiceRequestIllegalActivityTypeKey; }
    		  set { intakeServiceRequestIllegalActivityTypeKey = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestActor", IsRequired = false, Order = 69)]
    		public System.Collections.Generic.List<IntakeServiceRequestActor> IntakeServiceRequestActor
    		{
    		  get { return intakeServiceRequestActor; }
    		  set { intakeServiceRequestActor = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestCrossReference", IsRequired = false, Order = 70)]
    		public System.Collections.Generic.List<IntakeServiceRequestCrossReference> IntakeServiceRequestCrossReference
    		{
    		  get { return intakeServiceRequestCrossReference; }
    		  set { intakeServiceRequestCrossReference = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestIllegalActivity", IsRequired = false, Order = 71)]
    		public System.Collections.Generic.List<IntakeServiceRequestIllegalActivity> IntakeServiceRequestIllegalActivity
    		{
    		  get { return intakeServiceRequestIllegalActivity; }
    		  set { intakeServiceRequestIllegalActivity = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IntakeServiceRequestCorrection", IsRequired = false, Order = 72)]
    		public System.Collections.Generic.List<IntakeServiceRequestCorrection> IntakeServiceRequestCorrection
    		{
    		  get { return intakeServiceRequestCorrection; }
    		  set { intakeServiceRequestCorrection = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "TargetCompleteDate", IsRequired = false, Order = 73)]
    		public System.Nullable<System.DateTime> TargetCompleteDate
    		{
    		  get { return targetCompleteDate; }
    		  set { targetCompleteDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "SupervisorReview", IsRequired = false, Order = 74)]
    		public System.Nullable<bool> SupervisorReview
    		{
    		  get { return supervisorReview; }
    		  set { supervisorReview = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "RARejectedMedicaidStatus", IsRequired = false, Order = 75)]
    		public System.Nullable<bool> RARejectedMedicaidStatus
    		{
    		  get { return rARejectedMedicaidStatus; }
    		  set { rARejectedMedicaidStatus = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "MoneyFollowsPerson", IsRequired = false, Order = 76)]
    		public System.Nullable<bool> MoneyFollowsPerson
    		{
    		  get { return moneyFollowsPerson; }
    		  set { moneyFollowsPerson = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "IM54ADate", IsRequired = false, Order = 77)]
    		public System.Nullable<System.DateTime> IM54ADate
    		{
    		  get { return iM54ADate; }
    		  set { iM54ADate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "HCB", IsRequired = false, Order = 78)]
    		public System.Nullable<bool> HCB
    		{
    		  get { return hCB; }
    		  set { hCB = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "AdverseActionDate", IsRequired = false, Order = 79)]
    		public System.Nullable<System.DateTime> AdverseActionDate
    		{
    		  get { return adverseActionDate; }
    		  set { adverseActionDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ApplicationHearingReceivedDate", IsRequired = false, Order = 80)]
    		public System.Nullable<System.DateTime> ApplicationHearingReceivedDate
    		{
    		  get { return applicationHearingReceivedDate; }
    		  set { applicationHearingReceivedDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "ReversalAdverseActionDate", IsRequired = false, Order = 81)]
    		public System.Nullable<System.DateTime> ReversalAdverseActionDate
    		{
    		  get { return reversalAdverseActionDate; }
    		  set { reversalAdverseActionDate = value; }
    		}				
    		
    		[WcfSerialization::DataMember(Name = "MONumber", IsRequired = false, Order = 82)]
    		public string MONumber
    		{
    		  get { return mONumber; }
    		  set { mONumber = value; }
    		}				
    	}
    }


    Wednesday, July 19, 2017 7:51 PM

All replies

  • User1068175894 posted

    add the [Serializable] attribute

    Wednesday, July 19, 2017 10:12 PM
  • User1168443798 posted

    Hi jhackney01,

    How did you generate this code?

    Did the suggestion from JBetancourt to add [Serializable] work for you?

    As my experience, after generating the client code by VS Add Service Reference feature, it will generate like below:

    namespace WCFClients.WCFDataContractSvc {
        using System.Runtime.Serialization;
        using System;
        
        
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
        [System.Runtime.Serialization.DataContractAttribute(Name="CompositeType", Namespace="http://schemas.datacontract.org/2004/07/WCFDataContract")]
        [System.SerializableAttribute()]
        public partial class CompositeType : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
            
            [System.NonSerializedAttribute()]
            private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
            
            [System.Runtime.Serialization.OptionalFieldAttribute()]
            private bool BoolValueField;
            
            private string StringValueField;
            
            [global::System.ComponentModel.BrowsableAttribute(false)]
            public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
                get {
                    return this.extensionDataField;
                }
                set {
                    this.extensionDataField = value;
                }
            }
            
            [System.Runtime.Serialization.DataMemberAttribute()]
            public bool BoolValue {
                get {
                    return this.BoolValueField;
                }
                set {
                    if ((this.BoolValueField.Equals(value) != true)) {
                        this.BoolValueField = value;
                        this.RaisePropertyChanged("BoolValue");
                    }
                }
            }
            
    

    Or, svcutil.exe will generate like below:

    namespace WCFDataContract
    {
        using System.Runtime.Serialization;
        
        
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
        [System.Runtime.Serialization.DataContractAttribute(Name="CompositeType", Namespace="http://schemas.datacontract.org/2004/07/WCFDataContract")]
        public partial class CompositeType : object, System.Runtime.Serialization.IExtensibleDataObject
        {
            
            private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
            
            private bool BoolValueField;
            
            private string StringValueField;
            
            public System.Runtime.Serialization.ExtensionDataObject ExtensionData
            {
                get
                {
                    return this.extensionDataField;
                }
                set
                {
                    this.extensionDataField = value;
                }
            }
            
            [System.Runtime.Serialization.DataMemberAttribute()]
            public bool BoolValue
            {
                get
                {
                    return this.BoolValueField;
                }
                set
                {
                    this.BoolValueField = value;
                }
            }

    If your issue still exist, could you share us detail steps to reproduce your issue.

    Best Regards,

    Edward

    Thursday, July 20, 2017 5:23 AM
  • User-523892225 posted

    Thank you for the answer Edward Z,

    Yes, I used the [Serializable] above the 

    [WcfSerialization::DataContract(Namespace = "urn:QNet.ServiceRequest.DataContract", Name = "IntakeServiceRequest")]

    but it did not work.

    I'm afraid I cannot tell you how the code was auto-generated. The program is an ancient ASP.NET 2.0 Web Forms application I recently inherited when we took over a contract from another company.

    edit:  

    After doing some research, it appears that the page was auto-generated by the ServiceModel Metadata Utility Tool (SvcUtil.exe). So now I just have to figure out how that tool decides how to auto-generate a page.

    Thursday, July 20, 2017 1:03 PM
  • User-523892225 posted

    Thank you for the response JBetancourt.

    As you suggested, I added the [Serializable] attribute above the 

    [WcfSerialization::DataContract(Namespace = "urn:QNet.ServiceRequest.DataContract", Name = "IntakeServiceRequest")]

    line but it did not resolve the issue.

    Thursday, July 20, 2017 1:07 PM
  • User1068175894 posted

    what I would do is try to reproduce the issue in a smaller scale by using a code like the one on the end of this article:

    https://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer(v=VS.85).aspx 

    then start trimming your class (or a copy of your class so you dont break the rest of your code) until it works, in that process you should be able to figure out what is the problem

    Thursday, July 20, 2017 1:33 PM
  • User475983607 posted

    You are showing the client proxy not the actual source type.  You'll need to take a look at the WCF source or QNet.ServiceRequest.DataContracts.IntakeServiceRequest.

    Thursday, July 20, 2017 5:21 PM
  • User-523892225 posted

    The code I copied and pasted came from the auto-generated IntakeServiceRequest.cs file within the QNet.ServiceRequest.DataContracts.csproj project file from the ServiceRequest WCF service solution. I'm pretty sure this is the source file and not the proxy. 

    I did find another file named IntakeServiceRequest.cs located within the QNet.ServiceRequest.ServiceImplementation project in the same solution. It is also a generated file. This one was auto generated by a customized Web Service Software Factory by some company called CH Mack Inc.

    There is a third auto generated IntakeServiceRequest.cs file in the QNet.SerReqRouting.DataContracts project in the same solution. It was also generated by CH Mack Inc.

    Thursday, July 20, 2017 7:17 PM
  • User475983607 posted

    The code I copied and pasted came from the auto-generated IntakeServiceRequest.cs file within the QNet.ServiceRequest.DataContracts.csproj project file from the ServiceRequest WCF service solution. I'm pretty sure this is the source file and not the proxy. 

    You should be able to find the type by placing your cursor on the service implementation's input or output parameters and pressing F12.

    I did find another file named IntakeServiceRequest.cs located within the QNet.ServiceRequest.ServiceImplementation project in the same solution. It is also a generated file. This one was auto generated by a customized Web Service Software Factory by some company called CH Mack Inc.

    There is a third auto generated IntakeServiceRequest.cs file in the QNet.SerReqRouting.DataContracts project in the same solution. It was also generated by CH Mack Inc.

    The actual data contract could be in a library within the solution.  Start at the WCF service and find all the references.

    How did this all start?  Where there any changes made to the solution?  Has the link ever worked?

    Thursday, July 20, 2017 7:46 PM
  • User-523892225 posted

    How did this all start?  Where there any changes made to the solution?  Has the link ever worked?

    No the link has never worked. According to the customer it was a feature the old contractor could never get to work properly. The customer wants it fixed so I was tasked to figure it out.

    Thursday, July 20, 2017 9:08 PM
  • User1168443798 posted

    Hi jhackney01,

    Is your service a WCF Service?

    Is the service developed by you or do you have the source code of service?

    I would suggest you try to check whether you could access WCF Service wsdl address.

     Best Regards,

    Edward

    Friday, July 21, 2017 7:10 AM
  • User-523892225 posted

    Yes it is a WCF service. It is deployed by us and we have the source code.  This service is used for a ton of different stuff and I can access the wsdl address. It fails on one particular function only

    Friday, July 21, 2017 2:30 PM
  • User1168443798 posted

    Hi jhackney01,

    >> It fails on one particular function only

    Do you mean only one method throw this exception? If so, could you share us the method definition of Service and how you call this method?

    More information about this function would be helpful.

    Best Regards,

    Edward

    Monday, July 24, 2017 6:50 AM