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

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.

Related

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.

Receive wcf Callback in Asp.net Core application

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.

Use WCF Service or ASP.NET Web api for biometric device?

I have a web application(HRMS) in asp.net MVC4 and a Windows Form (later on converted in windows service) connected to a biometric device. So question is should I use WCF Service or asp.net web api to send attendance data?
Thanks in advance
Go for ASP.NET Web API.
Use WCF to create reliable, secure web services that accessible over a
variety of transports. Use ASP.NET Web API to create HTTP-based
services that are accessible from a wide variety of clients. Use
ASP.NET Web API if you are creating and designing new REST-style
services. Although WCF provides some support for writing REST-style
services, the support for REST in ASP.NET Web API is more complete and
all future REST feature improvements will be made in ASP.NET Web API. If you have an existing WCF service and you want to expose
additional REST endpoints, use WCF and the WebHttpBinding.
Its better to stay with WebAPI as it looks to be more appropriate for building further real RESTfull service development. WCF was originally created to enable SOAP-based services. For simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API should be good choice.

Difference between ASP.NET Web API and WCF regarding the Authentication mechanisms

I am making a choice between ASP.NET Web API and WCF.
I am not quite sure about the authentication part. Could some one shed some light on the differences?
I suppose there would be no actual difference under the hood. After all, the authenticaton mechanism refers to the HTTP request level on the ASP.NET engine integrated in IIS. It should have nothing to do with whether the module responding the specific HTTP request is implemented as an ASP.NET web page, WCF or Web API endpoint.
Nevertheless, there would be some differences in modelling and perhaps in configuration. WCF models the authentication mechanism as a "WCF authentication service" while Web API uses the normal security model of ASP.NET.
Use this WCF and ASP.NET security guide and this Web API security guides as a reference.
Hope I helped!

using acs to authenticate wp7 app and a wcf service

I am scorching the web to find an example of how to use ACS with WP7 app and SOAP WCF service. All i can find are examples for REST WCF Data Services and not a simple WCF service.
Does anyone know an example ?
You can have a look at this: Authenticating Users in a Windows Phone 7 App via Access Control Service, OData Services and Windows Azure
Hope this will help.