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 8154181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:15:21+00:00 2026-06-06T16:15:21+00:00

I have a server-side code using .NET Remoting to establish the connection with client.

  • 0

I have a server-side code using .NET Remoting to establish the connection with client. Normally, I understand that using interfaces with objects passed between the client and server is the norm and is a safer alternative, but for the simple communication I am establishing, I do not see the need to go through the trouble of defining the necessary classes and interfaces.

So for the following code, since I’m only returning a string to the client, I don’t feel the necessity but some might say otherwise so I’m posting my question here. Should I follow the general convention or stick with the way I’m doing? Also is the code shown below a correct way of establishing a server with remoting?

(Don’t ask why I’m using remoting instead of WCF. My boss specifically requested for remoting and I don’t know why.)

class HttpServer
{

    [STAThread]
    public static Boolean startService()
    {
        HttpChannel channel = new HttpChannel(80);

        ChannelServices.RegisterChannel(channel);
        Type ddcServerType = Type.GetType("DDCEngine.DDCServer");
        RemotingConfiguration.RegisterWellKnownServiceType(ddcServerType, "DDCServer", WellKnownObjectMode.Singleton);
        return true;
    }
}

public class DDCServer : MarshalByRefObject
{
    public string Hello()
    {
        string r = "hello";
        return r;
    }

    [Description("Sets a new IO Point List in the DDC.")]
    public string SetIOPointList(string host, DDCService.pointInformation[] pointList)
    {

        string result;

        DDCService.LGeDDCClient ddc = new DDCService.LGeDDCClient("LGeDDC", host);

        try
        {
            result = ddc.SetIOPoint(pointList);
        }
        catch (Exception ex)
        {
            result = ex.ToString();
        }
        return result;
    }
  • 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-06-06T16:15:23+00:00Added an answer on June 6, 2026 at 4:15 pm

    The problem with not using an interface is that you then need to include the server code on the client. That’s not an issue with something simple like this, but can be a real problem if the server interface becomes more complicated or the server implementation is involved.

    This becomes something of a deployment problem, too. Any time you change something in the server implementation, you have to copy the new server implementation to all clients. If you’re using an interface, then the only time you have to update the clients is if you change the interface. Server implementation changes don’t affect the clients. At least, they don’t affect the way that the clients interact with the server.

    This can also cause a security problem. If there is proprietary information in the server code, that code is exposed on every client. But if you use an interface, there’s no need to include the server code.

    It might look easier up front to avoid defining an interface for the server. But in the long run, using an interface is more secure, easier to modify, and easier to deploy–especially when there are multiple clients.

    All that said, you should ask your boss why he asked for Remoting. But read up on the differences between WCF and Remoting before you do. WCF is clearly a more robust technology.

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

Sidebar

Related Questions

If I have pages having server-side code in code-behind, then I know that the
I need to call ASP.Net server side code from the client. Because I'm in
We're using .NET Remoting with a Client/Shared/Server architecture where: Shared DLL: common to both
I know that the asp.net repeater doesnt have a Client side object model, and
I have the following node.js server-side code: var app = require('http').createServer(handler) , io =
I have some troubles with receiving data on server side. Here goes the code:
I have created an application server side that will create a pdf of a
I'm trying to debug Sitecore 6 ASP.NET code using Visual Studio 2008 (Windows Server
I have been using Anthem.NET in ASP.NET 2.0 projects for a few side projects
I'm using ASP.NET with C# 2.0. I have created some objects for a database

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.