Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 478715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:43:10+00:00 2026-05-13T00:43:10+00:00

I can’t figure this out as I go through demos that seem to work.

  • 0

I can’t figure this out as I go through demos that seem to work. I have a WCF service I was trying to use Linq to SQL with. However, all I ever get is the error System.Data.Linq.Table cannot be serialized. So I started with my own class thinking I could build it back up until get the error. Problem is I get the error even trying to use an empty class. Just using the “As System.Linq.Table(Of xxx)” on my method gives me this error.

Type ‘System.Data.Linq.Table`1[LinqADMRequest2b]’ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types.


Imports System.ServiceModel
Imports System.ServiceModel.Activation
Imports System.Runtime.Serialization
Imports System.Collections.Generic
Imports Linq

<ServiceContract(Namespace:="")> _
<ServiceBehavior(IncludeExceptionDetailInFaults:=True)> _
<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)> _
Public Class ComplyTrackWCFService

     _
    Public Function GetTestRequests() As System.Data.Linq.Table(Of LinqADMRequest2b)
        'Dim ct As New Linq2.ComplyTrackDataContext()
        'Dim queryresults = ct.ADMRequests 'ct.ADMRequestGetListByUser("", "155")
        'Return queryresults
    End Function

End Class

<DataContract()> _
<Serializable()> _
Public Class LinqADMRequest2b
    Implements ISerializable

    Private _firstName As String
     _
    Public Property FirstName() As String
        Get
            Return _firstName
        End Get
        Set(ByVal Value As String)
            _firstName = Value
        End Set
    End Property

    Public Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) Implements System.Runtime.Serialization.ISerializable.GetObjectData

    End Sub

End Class

As you can see the GetTestRequests() doesn’t do anything other then say it’s going to return a System.Data.Linq.Table(Of LinqADMRequest2b)

I can’t get the LinqADMRequest2b to serialize.

Type ‘System.Data.Linq.Table`1[LinqADMRequest2b]’ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:43:11+00:00Added an answer on May 13, 2026 at 12:43 am

    Don’t return Table<T> from your service. It’s a complex queryable type that depends on its DataContext and isn’t an in-memory collection.

    Do return List<T>, you can convert the Table<T> to a List<T> by calling System.Linq.Enumerable.ToList().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me trying to find out why this doesn't work. The brushes
Can someone help me understand this question? I may have it on my tomorrow
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Can any one help me in sorting this out in sed/awk/perl Input file Start
I am trying to loop through a bunch of documents I have to put
Can I order my users in the database, so I don't have to say
Can anyone explain to me why this program: for(float i = -1; i <
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.