Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Friday, August 21, 2015

WCF tutorial to Insert, Bind, Edit, update and Delete the record from sql server database in Asp.net

In this tutorial I am going to explain how to Insert, Bind, Edit, update and Delete the record using WCF service from sql server database in Asp.net using C#

Description:

We have to perform the following task to Insert, Bind, Edit, update and Delete the record into Sql Server database:
Create Database and table
Create a WCF service
Create a Web application (Website) to consume the WCF service

Implementation:
I have created a Table Movie:

WCF tutorial to Insert, Bind, Edit, update and Delete the record from sql server database in Asp.net

Create store procedures to Insert, Update, Delete and fetch record.

Monday, August 17, 2015

Display records in Gridview from sql server database using WCF service

In this article I am going to explain how to Display records in Gridview from sql server database using WCF service in asp.net

Description:

I have created a table Movie and it has the records. 

To display the records from sql server database table we have firstly create a WCF service and website (to consume the WCF service).

Sunday, August 16, 2015

WCF tutorial: Create and Consume WCF Service using visual studio 2013

How to insert record into Sql Server database using WCF service

In this tutorial I am going to explain how to insert record into Sql Server database using WCF service

Description:

We have to perform task to insert the record into Sql Server database :
Create Database and table
Create a WCF service
Create a Web application (Website) to consume the WCF service

Implementation:
I have created a Table Movie:

How to insert record into Sql Server database using WCF service
Create a store procedure to insert record in database table

Create PROCEDURE Sp_InsertMovieDetail
(
@name varchar(100),
@genre varchar(100),
@cost int,
@poster varchar(max)
)
AS
BEGIN
            SET NOCOUNT ON;
Insert into Movie(Name,Genre,Cost,Poster) values(@name,@genre,@cost,@poster)

END

Saturday, August 15, 2015

WCF services VS Web services in Asp.net

In this article I am going to differentiate the WCF service and web service.

In the previous article I have explained Introduction to WCF.


Web service
WCF service
Web service is available in the namespace System.Web.Services.Webservices
WCF service is available in the namespace System.ServiceModel
It is hosted only in IIS.
WCF is hosted in IIS, WAS (Window activation service), self hosting and managed window service.
It is supported only HTTP and HTTPS protocol.
It supports various protocol i.e.  HTTP, HTTPS, WS-HTTP, TCP/IP and MSMQ.
Web services have .asmx extension.
WCF services have .svc extension.
[webservice] and [webmethod] attributes are used to define the web service.
[ServiceContract] and [OperationContract] attributes are used to define the WCF service.
It is support security but less secure as compare to WCF services.
WCF supports security, reliable messaging and transaction. It is more secure compare to web services.
It supports one way and request-response service operations.
It supports the one way, two way (duplex) and request-response operations.
It is used for XML serializer.
It is used for DataContarct serializer.
In web services hash table cannot be serialized.
In WCF hash table can be serialized.
Performance wise web services are slow.
WCF is faster than web services.
It doesn’t support multithreading.
It supports the multi threading by using ServiceBehaviour class.
It supports XML and MTOM (Message transmission optimization Mechanism)
It supports XML, MTOM (Message transmission optimization Mechanism) and binary message encoding.
Unhandled exceptions are returned to the client as SOAP faults.
Unhandled exceptions are not return to the client as SOAP faults. WCF support better exception handling by using fault contract.

In this article we have know the difference between WCF service and Web serviceI hope you enjoyed this article.

Thursday, August 13, 2015

WCF: Introduction to Window communication foundation (WCF) in Asp.net

WCF stands for windows communication foundation and was first released as part of .NET Framework 3.0.  It is a set of application programming interface (API) and used to implement and deploy service oriented application. WCF supports multiple bindings like HTTP, HTTPS, TCP/IP, MSMQ and PIPE. WCF provide better reliability and security as compared to web services. WCF going to covers the web services.

Advantages on WCF:-
 1). WCF is faster than web services.
 2). WCF has support for various protocols like HTTP, HTTPS, TCP/IP, MSMQ, and PIPE.
 3). We can host the WCF on IIS, WAS, self hosting and window service.
 4). WCF provide better reliability and security as compared to web services.
 5). WCF provide the integrated logging mechanism which can be used by enabling the trace mechanism from configuration file.
 6). WCF support better exception handling using a fault contract.