question

Elado avatar image
0 Votes"
Elado asked JiayaoWu-MSFT commented

How to implement WCF service (intead of the obsolete ASMX Web Method)

Hi,
I have a C# project with business logic layer (BLL DAL).
I want to connect the SQL database with WCF service instead of ASMX Web Method

Runnig the function's results from the DAL and BLL projects must be displayed in the browser.

I searched information about it but could find how to do WCF service instead of with ASMX.

( I didn't find any project to add with WCF only WPF!! )

Can anyone help me with how to implement WCF in the project ?


dotnet-csharpwindows-wcf
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Elado ,
WCF is a runtime and a set of APIs for creating systems that send messages between services and clients.
So WCF is not used to present data and may not suit your needs.

1 Vote 1 ·

I'm not sure how you are searching but the documentation for WCF is extensive and openly published.

Keep in mind, WCF is also obsolete.


0 Votes 0 ·

Than what should I use to contact the database and to display results inside the server side for the user ?

0 Votes 0 ·

Than what should I use to contact the database and to display results inside the server side for the user ?

WCF is a service and does not have a display. As explained, with links, in your other thread; Web API is the latest service (REST) in the ASP.NET world. ASP.NET Core is the latest framework.

MVC or Razor Pages is designed for display.

I recommend going though a few Getting Started tutorials before moving forward.

Razor Pages
Web API
Razor Pages w/ Data Access


0 Votes 0 ·

Should I use this link instead of ASMX Web Method and WCF ?
API with ASP.NET Core -
first-web-api

I know the ASMX was very simple to display results in the chrome,
English isn't my native language, how will I check the results from the DB with web API with ASP.NET Core ?



0 Votes 0 ·

for REST apis use the link to create a webapi project. this is probably the correct answer.

If you need a service level with contract like WCF, then it is recommend to use gRPC.

https://grpc.io

0 Votes 0 ·
Show more comments

0 Answers