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

  • Home
  • SEARCH
  • 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 6654357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:22:52+00:00 2026-05-26T01:22:52+00:00

I want to implement something like a WCF OData provider but using NetTcpBinding instead

  • 0

I want to implement something like a WCF OData provider but using NetTcpBinding instead of WebHttpBinding / REST. I want the client to be able to write linq queries that are transparently serialized and sent to the server (or potentially, multiple servers, to consolidate distributed database instances).

One way to do this is to implement a custom IQueryable provider. You could pass the query expression over the wire in (at least) two ways:

1) Serialize the expression to xml, send it, and deserialize it on the server

2) Pass what is more-or-less the precursor to raw SQL to the server in the form of DataContracts

1 is difficult and simply alot of work, and 2 obviously could pose security risks (sql injection). Say for instance a ‘Where’ expression was encapsulated and passed to the server like so,

[DataContract]
public class WhereFilter
{
    [DataMember]
    public string Property { get; set; }

    [DataMember]
    public string Operation { get; set; }

    [DataMember]
    public string Value { get; set; }
}

Where the above ultimately represents the part of an SQL query that states ‘Where [SomeColumn] = ‘SomeValue’.

My question is whether the WCF client-server connection could be made secure enough to warrant such an approach without presenting too much of a security risk? Or alternatively if there are any other ways of implementing an OData-like provider over NetTcpBinding i’d be interested.

  • 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-26T01:22:53+00:00Added an answer on May 26, 2026 at 1:22 am

    I’d begin by trying the Expression Tree Serialization project. It aims to allow serialization of expressions, but I haven’t used it to comment on how well it works.

    Failing that, then you could construct queries using a DataContract. There are risks but you can always exclude unwanted operations (e.g. UPDATE or DELETE the UserRole table) through database permissions. Your WCF service should connect to the database with a dedicated account, and that account should only have permissions to do what it needs (no CREATE or DROP, only SELECT from relevant tables, etc).

    And of course you can also secure your WCF connection to stop unwanted connections (see WCF Security Overview). One option is to require certificate authentication – only those users with the relevant certificate will be able to use the service.

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

Sidebar

Related Questions

I want to implement something like this using JSF.(part of search screen) More and
I want to implement something like voip communication that client doesn't need to install
I want to implement something like Col3 = Col2 + Col1 in SQL. This
I want to implement something exactly like Changing the Default Text in the Search
i want to implement a dynamic relation mechanism with python something like: a:=10 b:=30
I know it's simple to implement, but I want to reuse something that already
I want to implement something like Tumblr or Wordpress by giving user the option
I wrote small service class and I want implement something like that : service
I want to implement something like facebook's unread items/notifications. I have the following model
I want to implement something like what four square do when the application crashes

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.