Solve two errors in WCF Duplex Service project (wcf, duplex, c#, .net)

완료 등록 시간: 6년 전 착불
완료 착불

Good day!

I'm a intermediate or junior programmer. As long as I have other tasks, i don't want/cannot spend much time on solving 2 errors on one of my projects (wcf, duplex service, named pipes).

What is needed is to get 2 errors solved. Actually, the aim is not to have them solved in code. I would like to get written detailed explanation of what has to be done to fix these two errors, so that i can fix them myself. But I don't think that it is a good idea to give the answer without actually doing a little bit of work with code.

The project is on github.

---------------------

One of the errors is "The InstanceContext provided to the ChannelFactory contains a UserObject that does not implement the CallbackContractType ‘...’".

What happens is that i'm trying to create a WcfServiceChannelFactory and trying to put the CallbackServiceHost into this factory. This host has the callback service with the interface implemented, but the error says, that CallbackServiceHost doesn't have the implementation of callback contract.

---------------------

The other error is related to the inheritance of callback contracts. For example, the wcf callback contract is IWcfCallback. I would like to have a little bit of interface sergregation here. I.e. something like this:

interface IWcfCallback: IPingCallback, IOtherSubServiceCallback

There is one wcf servce hosted and it has one callback, but this callback is logically splitted into other ones.

The problem now is that when i do the following, everything is fine:

IWcfCallback callbackChannel = [login to view URL]<IWcfCallback>();

[login to view URL]();

But when i do the following then I get problems:

IPingCallback callbackChannel = (IPingCallback)[login to view URL]<IWcfCallback>();

[login to view URL]();

----------------------

A little bit about existing architecture:

This project is only a weak old, so i hope it's relatively easy to cope with.

One project is Topshelf windows service, which hosts IWcfService. (MS4DService)

The other project (MS4DMonitor) is wpf widows tray app which has context menu command "Ping example". After this context menu item is clicked, it is possible to call wcf service, which is hosted on windows service via pressing "ping button".

I recommend to close this tray app via contextMenu/exit but not by shutting down in visual studio (stop). Otherwise more errors may appear.

In order to start() windows service MS4DService, it is enough to launch the MS4DService via visual studio or simply by MS4DService.exe.

MS4DService has a simple event bus. Now the implemented handler is EventHandler<PingEvent, IWcfCallback>, but after solving the second error I would like it to be EventHandler<PingEvent, IPingCallback>.

MS4DMonitor also has a simple event bus called TrayEventBus.

Here is the link to GithubProject

[login to view URL]

-----------------------------

As for the first error, similar problems are described here (may be they contain the answer, may be not).

[login to view URL]

[login to view URL]

[login to view URL]

[login to view URL]

C# 프로그래밍

프로젝트 ID: #14774464

프로젝트 소개

6 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: 6년 전

수상자:

indorulfree

Hello Sir I only need the error from Visual Studio ; I have already experience with Duplex Chanell Factory ; I was implemented successfully with TCP/IP Please contact, let's solve this remotely. Vali Relevant Skills a 기타

$40 USD (1일 이내)
(7건의 리뷰)
2.7

이 일자리에 대한 프리랜서 6 명의 평균 입찰가: $148

rkatoch

**EXPERTISE .NET,C# ,ASP DEVELOPER HAVING 12 YEARS EXPERIENCE Relevant Skills and Experience HTML,CSS,JAVASCRIP, MOBILE DEVELOPMENT,XAMARIN Proposed Milestones $750 USD - ESTIMATION COST JUST NEED 2min TO DISCUSS A 기타

$750 USD (1일 이내)
(8 리뷰)
6.6
BeshoyMousaKhair

. Relevant Skills and Experience . Proposed Milestones $25 USD - .

$25 USD (1일 이내)
(7 리뷰)
2.2