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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:16:41+00:00 2026-05-11T15:16:41+00:00

I have a bizarre problem that is doing my head in. I have the

  • 0

I have a bizarre problem that is doing my head in.

I have the following classes defined in a single project:

public abstract class AbstractUnitModel {        public void executeRemoteModel(){}  }  //this class also implements a seperate interface, but I dont think that is the issue public class BlastFurnaceUnitModel : AbstractUnitModel, IUnitModel {} 

Now if I try something like this, it works as expected:

class Class1 {      public void method1() {          BlastFurnaceUnitModel b = new BlastFurnaceUnitModel();         method2(b);     }      public void method2(AbstractUnitModel a) {}   } 

Now I have another project that exposes a web method. This method takes an AbstractUnitModel and executes it remotely, then sends the results back to the client. So on the server I have this:

 [WebMethod]  public AbstractUnitModel remotelyExecuteUnitModel(UnitModelWrapperInterface.AbstractUnitModel unitModel)         {             unitModel.executeRemoteModel();            return unitModel;           } 

And on the client I have this:

   public void remoteExecution() {                  var unitModelWebService = new UnitModelRemoteServer.RemoteModelExecutionWebService();                 unitModelWebService.remotelyExecuteUnitModelCompleted += new UnitModelRemoteServer.remotelyExecuteUnitModelCompletedEventHandler(remoteExecutionCompleted);                 unitModelWebService.remotelyExecuteUnitModelAsync(this.remoteBF);             } 

But my project will not compile, and I get these errors: Error 109 The best overloaded method match for ‘CalibrationClient.UnitModelRemoteServer.RemoteModelExecutionWebService.remotelyExecuteUnitModelAsync(CalibrationClient.UnitModelRemoteServer.AbstractUnitModel)’ has some invalid arguments

Error 110 Argument ‘1’: cannot convert from ‘UnitModelWrapperInterface.BlastFurnaceUnitModel’ to ‘CalibrationClient.UnitModelRemoteServer.AbstractUnitModel’

I can not figure out why this is happening. I have references in the server project to the namespace where AbstractUnitModel is defined. The only thing that looked a little funny to me is that it is using AbstractUnitModel from the ‘CalibrationClient’ namespace rather than the UnitModelWrapperInterface. It seems when VS generates the proxy for a webservice on the client it creates a partial abstract implementation of AbstractUnitModel. Is this the source of my problem? If so, how might I go about fixing it?

edit for solution: As pointed out, the client needs to know about all classes that could be sent across the wire. I ended up solving this by removing the generated proxy classes and referencing the common library. Not ideal but good enough in this situation.

  • 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. 2026-05-11T15:16:42+00:00Added an answer on May 11, 2026 at 3:16 pm

    You might try [XmlInclude]:

    [XmlInclude(typeof(BlastFurnaceUnitModel))] public abstract class AbstractUnitModel {...} 

    Worth a try, at least…

    (edit) Or at the method level:

    [WebMethod(), XmlInclude(typeof(BlastFurnaceUnitModel))] public AbstractUnitModel remotelyExecuteUnitModel(...) {...} 

    (less sure about the second)

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

Sidebar

Ask A Question

Stats

  • Questions 140k
  • Answers 140k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer as far as I know you cannot do this. the… May 12, 2026 at 7:59 am
  • Editorial Team
    Editorial Team added an answer In this case, the Matrix class is a 2D transformation… May 12, 2026 at 7:59 am
  • Editorial Team
    Editorial Team added an answer To switch color of LabelField we can check if it's… May 12, 2026 at 7:59 am

Related Questions

I was using this routine, triggered by the Worksheet_Change event, to display a selected
I am having a bizare problem where I have a script that works elsewhere
I recently started working at a company with an enormous enterprisey application. At my
...or... What evil in the depths of WPF have I awoken? I'm creating a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.