Receive wcf Callback in Asp.net Core application - asp.net-mvc-4

I am having a Duplex WCF Service hosted on console. This is tested and worked fine.
I want to consume this WCF service in Asp.net Core. I have done this using this https://medium.com/#narinkaew/using-wcf-soap-services-in-net-core-fb13180c4eda Consume WCF in Asp.net Core.
I am able to get response, but I am not getting any callback. Its just keep waiting.
I have uploaded the Code https://filebin.net/pf9eplqjncc0octj.
ClinicWcfService - is wcf Service Application
HospitalServiceHost - WCF Service Hosted on Console
ServiceEngineersDesk - is Asp.net Core Application.
Can someone tell me how to get a WCF callback in asp.net core application?

I have done this from my side.
Instead of creating instance of interface of the wcf service, create a instance of interface implementation.
Now this class exposes the event of the callback. Just subscribe to it
After a some struggle i was able to found out.

Related

when ASP.NET core web API app connecting call WCF service API, how to authenticate

I am developing a C# backend app using ASP.NET core web API application. Inside this API, I need to call some API(WCF SOAP service) from database. For this WCF service, we were provided pre-built .dll, so will not use adding service reference. When calling these WCF service, have to pass my windows credential to let WCF service know I am a qualified user before use the service. Now I am stuck on how I can pass my credential to this WCF. What is the right architecture to use.(Screen shot is showing some endpoint of the WCF service)
Adding some background info, In our react frontend, will call these ASP.NET core web API to get data back from WCF, and show it on frontend.
I am new to C# and .Net core. Please share some insight. Thanks a lot. Happy New Year!!!
I did the ASP.NET core web API part. but could not figure out the right way to authenticate when connecting to WCF API.

WCF Rest Service Reference in ASP.net core 3.1 API

I've created a WCF Restful service(Framework 4.7.2) and hosted the service in IIS sever. I would like to add the service on a ASP.net core 3.1 Api. It does fails while adding it via connected service. The wcf service has endpoint with webhttpbinding.error
Any help would be appreciated..
Core does not support webhttpbinding, wcf only supports BasicHttpBinding, CustomBinding, NetHttpBinding, NetTcpBinding:
So there are two current solutions:
Modify the binding of the server, do not use webhttpbinding.
The client continues to use the .net framework.
Feel free to let me know if the problem persists.

consuming WCF service in .net 2.0 windows application

I'm new in WCF service and I need to consume the WCF service from my client for my current .net 2.0 windows app. I successfully added the WCF service as web reference in my .net 2.0 application but when using the web method of the service it took long time to execute the method and in the end my application is not responding. Base on the request in fiddler, the request has been timed out. My client provides me a user name and password but I don't know where to use it. Base on the wcf web service wsdl of my client, it uses WSHttpBinding.
I also created a sample .net 4.0 windows application and added the service as reference but still cannot use the web method. I check also the request in fiddler and gives me a response error "The request for security token could not be satisfied because authentication failed.".
Please help. I need to consume the WCF service using my existing .net 2.0 application.
Thank you very much in advance!
If you want to consume your WCF service from .NET 2.0 via adding web reference you must use BasicHttpBinding - that is only backward compatible build-in binding (except custom defined binding) with ASMX based client.
Your exception in case of .NET 4.0 test complains about security token - WsHttpBinding uses Windows security by default. It is hard to diagnose the problem further because you didn't provide enough information.

Can you pass data from HttpModule to IIS hosted WCF without aspNetCompatibility enabled

I currently have a HttpModule that generates a unique ID per external client request, appends it to the IIS log, and adds it to the HttpContext.Items collection in order to pass in on the thw web service.
I am currently replacing the web service with a WCF service (still hosted under IIS). I can successfully do the same process by enabling AspNet compatibility, but I would prefer not to. Is there any way to pass data from a HttpModule to say the OperationContext of the WCF service without enabling AspNet compatibility?
This is what MSDN has to say,
HttpModule extensibility: The WCF hosting infrastructure intercepts WCF requests when the PostAuthenticateRequest event is raised and does not return processing to the ASP.NET HTTP pipeline. Modules that are coded to intercept requests at later stages of the pipeline do not intercept WCF requests.
I suggest you go through this MSDN documentation completely to understand how ASP.Net and WCF coexist

Is is possible for a Compact Framework 2.0 App to consume a WCF Web service

We are in the process of creating a new WCF web service (WCF service that has an basicHttpBinding Endpoint) to carry out some of our business logic.
The web application connects not problem at all, however our legacy Compact framework application doesn't seem to see the service at all.
Are we on to a loser here and should we just revert to ASMX web service (the Compact framework cannot be upgraded) or is there a way around this?
Yes you can but you need to treat it as a soap service not a WCF service with all the .net 3.5 goodness. Start up your web service and create web service reference in your .net 2.0 CF and use the auto generated code.