Connecting WCF with Asp.net

Create a sample Asp.net application named as "aspnetwcf" in VS 2008 .



Select Project --> Right Click --> from the context menu choose " Add Service Reference "

Type WCF service url in the Address box --> Click Go --> Services will Display as Below



Click Ok.

open default.aspx.cs, In the page load event Add the below code

protected void Page_Load(object sender, EventArgs e)
{
ServiceReference1.EmployeeClient employeeClient = new ServiceReference1.EmployeeClient();
Response.Write(employeeClient.GetName());
}