What is the difference between Webservice and WCF
Answer Posted / arif imteyaz
ASP.NET Web Method is called ASMX [because of the file
extension] (check 4GuysFromRolla about this, they have a
good tutorial)
That technology makes you expose functions as a Web Service
so you can connect it from everywhere and use it. But... you
can't protect the data between server and client, you can
send big files clear and know what happend, etc...
[Note] you can protect the access to the web service using
certificates, but it is complicated but normally, in ASMX we
use username / passsword.
in WCF, you are in the different world about Web
Services,and this s the best technology in .NET to expose
Services (can you see the difference... Services! not Web
Services), WCF does not need IIS to run, it can run as a
System Service on the server, using a console ambient (like
command line), etc, so we say that WCF is a Service not Web
Service. Remember ASMX need IIS to run.
with WCF you can use SSL to encrypt the communication (to do
that in ASMX you need to use WSE - Web Services
Enhancements), you can send big files and securely (to do
that in ASMX you need to use MTOM - Message Transmission
Optimization Mechanism).
you can set the transmission preferences just changing one
line of code, the security is much higher, etc, etc :)
hope you get a better general overview with this, but there
is much more.
bottom line: to expose Web Services that you do not need to
protect, you can use ASMX, no problem at all, but if you
need to protect the communication somehow, do it in WCF!
link: you can read here some performance comparative between
the 2 services
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
What is the difference between dispose() and finalize()?
Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc
Explain the difference between panel and groupbox classes using .net?
What is difference between ispostback and autopostback in asp net?
Explain the significance of routing? : asp.net mvc
What is the use of service provider?
Write some code using interfaces, virtual methods, and an abstract class`
Apart from IDE what are the enhancements in asp.net 2.0?
Explain what does wsdl stand for?
What is difference cookie and session?
Explain the steps to be followed to use passport authentication.
What is content page in asp net?
Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?
What is a 1x1 pixel?
What is the difference between ASP.NET Webforms and ASP.NET MVC?