Create and Consume WCF service using Visual Studio 2010

In this article I am going to demonstrate how to create a WCF service, that can be hosted inside IIS and a windows application that consume the WCF service.

To support service oriented architecture, Microsoft developed the programming model named Windows Communication Foundation (WCF). ASMX was the prior version from Microsoft, was completely based on XML and .Net framework continues to support ASMX web services in future versions also. While ASMX web services was the first step towards the service oriented architecture, Microsoft has made a big step forward by introducing WCF.

An overview of planning for WCF can be found from this link http://msdn.microsoft.com/en-us/library/ff649584.aspx .

The following are the important differences between WCF and ASMX from an asp.net developer point of view.

1. ASMX web services are easy to write, configure and consume

2. ASMX web services are only hosted in IIS

3. ASMX web services can only use http

4. WCF, can be hosted inside IIS, windows service, console application, WAS(Windows Process Activation Service) etc

5. WCF can be used with HTTP, TCP/IP, MSMQ and other protocols.

The detailed difference between ASMX web service and WCF can be found here. http://msdn.microsoft.com/en-us/library/cc304771.aspx

Though WCF is a bigger step for future, Visual Studio makes it simpler to create, publish and consume the WCF service. In this demonstration, I am going to create a service named SayHello that accepts 2 parameters such as name and language code. The service will return a hello to user name that corresponds to the language.

So the proposed service usage is as follows.

Caller: SayHello(“Sreeju”, “en”) -> return value -> Hello Sreeju

Caller: SayHello(“اسم”, “ar”) -> return value -> مرحبا اسم

Caller: SayHello(“Sreeju”, “es”) - > return value -> Hola Sreeju

Note: calling an automated translation service is not the intention of this article. If you are interested, you can find bing translator API and can use in your application. http://www.microsofttranslator.com/dev/

So Let us start

First I am going to create a Service Application that offer the SayHello Service. Open Visual Studio 2010, Go to File -> New Project, from your preferred language from the templates section select WCF, select WCF service application as the project type, give the project a name(I named it as HelloService), click ok so that visual studio will create the project for you. In this demonstration, I have used C# as the programming language.

clip_image002

Visual studio will create the necessary files for you to start with. By default it will create a service with name Service1.svc and there will be an interface named IService.cs. The screenshot for the project in solution explorer is as follows

clip_image003

Since I want to demonstrate how to create new service, I deleted Service1.Svc and IService1.cs files from the project by right click the file and select delete.

Now in the project there is no service available, I am going to create one. From the solution explorer, right click the project, select Add -> New Item

Add new item dialog will appear to you. Select WCF service from the list, give the name as HelloService.svc, and click on the Add button.

clip_image005

Now Visual studio will create 2 files with name IHelloService.cs and HelloService.svc. These files are basically the service definition (IHelloService.cs) and the service implementation (HelloService.svc). Let us examine the IHelloService interface.

clip_image006

The code state that IHelloService is the service definition and it provides an operation/method (similar to web method in ASMX web services) named DoWork(). Any WCF service will have a definition file as an Interface that defines the service.

Let us see what is inside HelloService.svc

clip_image007

The code illustrated is implementing the interface IHelloService. The code is self-explanatory; the HelloService class needs to implement all the methods defined in the Service Definition. Let me do the service as I require.

Open IHelloService.cs in visual studio, and delete the DoWork() method and add a definition for SayHello(), do not forget to add OperationContract attribute to the method. The modified IHelloService.cs will look as follows

clip_image008

Now implement the SayHello method in the HelloService.svc.cs file. Here I wrote the code for SayHello method as follows.

clip_image009

I am done with the service. Now you can build and run the service by clicking f5 (or selecting start debugging from the debug menu). Visual studio will host the service in give you a client to test it. The screenshot is as follows.

clip_image011

In the left pane, it shows the services available in the server and in right side you can invoke the service. To test the service sayHello, double click on it from the above window. It will ask you to enter the parameters and click on the invoke button. See a sample output below.

clip_image013

Now I have done with the service. The next step is to write a service client.

Creating a consumer application involves 2 steps. One generating the class and configuration file corresponds to the service. Create a project that utilizes the generated class and configuration file. First I am going to generate the class and configuration file.

There is a great tool available with Visual Studio named svcutil.exe, this tool will create the necessary class and configuration files for you. Read the documentation for the svcutil.exe here http://msdn.microsoft.com/en-us/library/aa347733.aspx .

Open Visual studio command prompt, you can find it under Start Menu -> All Programs -> Visual Studio 2010 -> Visual Studio Tools -> Visual Studio command prompt

clip_image014

Make sure the service is in running state in visual studio. Note the url for the service(from the running window, you can right click and choose copy address). Now from the command prompt, enter the svcutil.exe command as follows.

clip_image015

I have mentioned the url and the /d switch – for the directory to store the output files(In this case d:\temp). If you are using windows drive(in my case it is c: ) , make sure you open the command prompt with run as administrator option, otherwise you will get permission error(Only in windows 7 or windows vista).

The tool has created 2 files, HelloService.cs and output.config.

Now the next step is to create a new project and use the created files and consume the service. Let us do that now. I am going to add a console application to the current solution. Right click solution name in the solution explorer, right click, Add-> New Project

Under Visual C#, select console application, give the project a name, I named it TestService

clip_image017

Now navigate to d:\temp where I generated the files with the svcutil.exe. Rename output.config to app.config.

Next step is to add both files (d:\temp\helloservice.cs and app.config) to the files. In the solution explorer, right click the project, Add -> Add existing item, browse to the d:\temp folder, select the 2 files as mentioned before, click on the add button.

clip_image019

Now you need to add a reference to the System.ServiceModel to the project. From solution explorer, right click the references under testservice project, select Add reference. In the Add reference dialog, select the .Net tab, select System.ServiceModel, and click ok

clip_image020

Now open program.cs by double clicking on it and add the code to consume the web service to the main method. The modified file looks as follows

clip_image021

Right click the testservice project and set as startup project. Click f5 to run the project. See the sample output as follows

clip_image022

Publishing WCF service under IIS is similar to publishing ASP.Net application. Publish the application to a folder using Visual studio publishing feature, create a virtual directory and create it as an application. Don’t forget to set the application pool to use ASP.Net version 4.

One last thing you need to check is the app.config file you have added to the solution. See the element client under ServiceModel element. There is an endpoint element with address attribute that points to the published service URL. If you permanently host the service under IIS, you can simply change the address parameter to the corresponding one and your application will consume the service.

clip_image024

You have seen how easily you can build/consume WCF service. If you need the solution in zipped format, please post your email below.

Published Wednesday, December 15, 2010 10:29 AM by sreejukg
Filed under: , ,

Comments

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, December 15, 2010 4:48 AM by Fabrizio

Very useful. Thank you.

# re: Create and Consume WCF service using Visual Studio 2010

Friday, December 24, 2010 5:14 AM by bharath

this blog is very useful for understanding of wcf in simple way

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, December 29, 2010 5:37 PM by Srini

excellent..very useful..thanks Sreeju

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, January 6, 2011 12:04 AM by Ashwini

Very excellent...very easy to understand...good job..

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 8, 2011 1:30 PM by Taj

Thanks much

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 22, 2011 7:15 AM by Aswin

Great article... Very good explanation. Keep it up :)

# re: Create and Consume WCF service using Visual Studio 2010

Saturday, February 26, 2011 12:33 AM by dubturboreview

Hey, very informative and interesting. Looks like you put a lot of effort and research into it. Keep up the good work!

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, March 2, 2011 1:34 AM by Sarath

Thank you

# re: Create and Consume WCF service using Visual Studio 2010

Monday, March 21, 2011 3:24 AM by Faisal Ahmed

Excellent Post for beginner

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, April 6, 2011 5:33 AM by Ananda N

excellent article..

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, April 21, 2011 2:25 AM by Chirag kavathiya

very good and easy example..

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 4, 2011 5:44 AM by Latha

It is very useful for beginner

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 4, 2011 9:44 PM by Ravi

Much appreciated.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 18, 2011 2:28 AM by shashank patel

really amazing , nice article for begineers.

Extremelly thanks  a lot

# re: Create and Consume WCF service using Visual Studio 2010

Monday, May 23, 2011 9:13 PM by Emiriic

Thanks so much for your excellent article. This is an awsome post to a beginner like me.

Just wonder if you can also post the screen shots for exactly how to publish this wcf service under IIS.

Many thanks in advance

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 25, 2011 5:44 AM by Tib

Thank you so much! I'm not familiar with MVS and the MVS 10 new features..So, this article really helped!

Merci!

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, June 2, 2011 5:14 PM by Ivan

Thanks a lot for your article! Could you please suggest what is "change the address parameter to the corresponding one" in App.config? I am new with WCF services.  

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, June 2, 2011 5:23 PM by Devi

This article is very easy to understand and to follow.  Thanks a TON! Please do keep writing such good articles!

# re: Create and Consume WCF service using Visual Studio 2010

Monday, June 13, 2011 7:54 PM by Murali

I try to call the same in window service I am getting some error, can you explain how to consume this wcf thru window services...for the same example

# re: Create and Consume WCF service using Visual Studio 2010

Monday, June 13, 2011 8:07 PM by rodolfo

could you give us a sample where a web application projet is consuming a WCF app

Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, June 23, 2011 10:27 AM by Sabariraj K

Thanks for providing this article

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, June 23, 2011 1:31 PM by Sajjan

A.W.E.S.O.M.E.. simple and works perfectly! Thank you!

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, June 29, 2011 5:50 PM by SuperShaadi.com

thank you very much.

www.SuperShaadi.com

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, July 6, 2011 8:30 AM by sanjay

hi,i need a sample code for practical point of view.

if have some doubt if more then one service than how to set app config.

pls provide me sample code on below link

chakravorty.sanjay@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Monday, July 11, 2011 6:07 PM by kiwi

So the project type is wcf service library not wcf service application because if i go with service application i don't get wcf test application am i missing something?

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, July 14, 2011 9:33 AM by Bhhagya

I got working after seeing this article

# re: Create and Consume WCF service using Visual Studio 2010

Friday, July 22, 2011 12:35 AM by Neetu

After seeing this article no need of any training.Excellent way of explanation.Thanks a lot.

# re: Create and Consume WCF service using Visual Studio 2010

Monday, July 25, 2011 10:01 AM by Sifiso

Great article. I have a better understanding of WCF now.

# re: Create and Consume WCF service using Visual Studio 2010

Monday, July 25, 2011 10:18 AM by Sifiso

Nicely done. Thanks a mill.

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, July 26, 2011 8:29 AM by Saad

Excellent article for those who have just started to learn about WCF. Much appreciated.

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, August 2, 2011 9:23 AM by Nishant Ranjan

Hi,

First of all i thankful to you to give a simple manner solution for the first time WCF service creation.

I have created successfully the WCF Service Application adn when trying to consume then got the below error:

Please Help.

There was no endpoint listening at localhost/HelloService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Thanks in Advance.

Regards,

Nishant Ranjan

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, August 4, 2011 2:24 AM by gopal singh

thnks..

# re: Create and Consume WCF service using Visual Studio 2010

Monday, August 8, 2011 4:34 PM by ssh

Can you kindly tell which Service type this is?

SOAP, REST or JSON?

thnx

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, August 10, 2011 5:10 AM by Alan

I have a service function

... string GetValue(string aGroup, string aId)

which must read a value from a database table filtered on the aGroup & aId parameter's.

How can I achieve this ?

I've tried...:

1) adding an Entity Data Model but I don't know how to reference it from my *.svc.cs module.

2) Considered using WCF Data Service but I don't want ODATA ?

Any help would be appreciated

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, August 10, 2011 7:01 PM by Chris

Excellent job. A great way to just run a simple example. It helps to add more detail explaining why each step is done and the significance of files generated. Also, any alternative methods to generate files without using svcutil.exe. Please keep it up. Great work!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, August 23, 2011 4:03 PM by Hostilio Macias

If i would like to host the WCF as a windows Service, wich extra steps i need to do?, thanks in advance

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, August 24, 2011 10:34 AM by Amarjith kumar

Hi this article is very good for lanners

Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Friday, August 26, 2011 3:14 PM by Sid

I think this is the simplest and most practical way of learning WCF services

Thanks a lot

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, September 6, 2011 4:19 AM by Hyma

Very simple and useful! great work!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, September 6, 2011 6:47 AM by Krantisinh

Thanks a lot... I found this article very useful... Keep updating with such things!

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, September 15, 2011 2:59 AM by Praveen Mandalapu

Very good explanation and really helpfull.

Thanks

Keep posting :)

# re: Create and Consume WCF service using Visual Studio 2010

Friday, September 16, 2011 6:39 AM by vrushali

superb artical,,  Thanks alot

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, September 20, 2011 1:15 PM by Debbie

Thank you for the help. Other tutorials from other sites made me confused but this one is excellent!!!

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, September 21, 2011 8:17 AM by Hari

Beginner must read this article, who want to work in WCF and VS2010

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, September 22, 2011 9:01 AM by jyoti

very nice article for beginners.

# re: Create and Consume WCF service using Visual Studio 2010

Friday, September 23, 2011 3:48 AM by Vaibhav Sharma

Excellent article..very useful n helpful for beginners..

# re: Create and Consume WCF service using Visual Studio 2010

Friday, September 23, 2011 4:20 AM by Vibhu

excellent..very informative and understanding..very good for beginners..

# re: Create and Consume WCF service using Visual Studio 2010

Monday, September 26, 2011 8:54 AM by jfr

good for beginners

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, September 27, 2011 11:47 AM by Kate Fox

Great article! Thank you

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, September 29, 2011 6:06 AM by Christos

Wonderful article ! Thanks a lot. I think that it a great start for WCF. Thanks again !

# re: Create and Consume WCF service using Visual Studio 2010

Friday, September 30, 2011 3:04 PM by murali yadav

i need these topic in will you send me ......................

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, October 5, 2011 9:01 AM by Aadhar

Good one but we need some realtime example that is general in use and can think versetil on it.

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, October 11, 2011 5:51 AM by Priyanka

Really Nice artical can you please send me wsDualHttpBinding

in WCF.on padwalpriyanka10@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, October 12, 2011 8:23 AM by irfan

greate article please send me code of this application my email id is irfankhanamu@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, October 12, 2011 1:03 PM by Prabu

Good One. Easy to understand.

Thank you Sreeju.

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 1, 2011 9:05 AM by Neethu

Very useful. Thank you.

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, November 3, 2011 9:21 AM by Rashmeet

Excellent work .....loved it

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 8, 2011 4:36 AM by vishal yadav

how can it possible in visual studio 2008

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 8, 2011 9:06 AM by Ranjith

Very nice!!! Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 8, 2011 11:39 PM by sreejukg

@vishal yadav , Creating a WCF service application is absolutely possible with Visual Studio 2008. refer this MSDN article, make sure you have Visual Studio 2008 selected as the version

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 15, 2011 10:28 AM by Smitha

Great!!!

to work with WCF Services in Visual studio 2010.

Thanks !!!!!!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 15, 2011 1:40 PM by Per

Great article. Worked like a charm and saved me a lot of hours programming my first WCF service. Thanks a lot.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, November 16, 2011 6:16 AM by tency

Great Article..Thanks...

# re: Create and Consume WCF service using Visual Studio 2010

Monday, November 28, 2011 8:34 AM by Jai

Very good article, good for beginners

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, November 29, 2011 9:25 AM by Bhargava S

Thanks a Lot

I have got much better understanding of WCF now

U made my day :)

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, December 7, 2011 2:22 AM by Mohit Kumar

I'm getting an error related to endpoint configuration. My client side configuration is same as you have mentioned. Can us share the working sample of this article.

Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, December 7, 2011 9:35 AM by sairama

plz send the code

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, December 14, 2011 5:51 PM by Manish

Very Useful tutorial for beginners...I need zip example codes..Please Send it to my mail id: kumar.manish1983@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Friday, January 6, 2012 10:42 PM by arjun

Excellent article for beginners...! very easy to understand. thanks for the article.

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, January 12, 2012 6:35 AM by Mp

Excellent tutorial for beginners.Thanks a lot...

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, January 19, 2012 3:20 PM by Amulu

Ery useful thanks

# re: Create and Consume WCF service using Visual Studio 2010

Friday, January 20, 2012 5:01 AM by Iclarify software solution freshers 2011

It was really helpful we got what we expected.!!thanx a lot..!!

# re: Create and Consume WCF service using Visual Studio 2010

Monday, January 23, 2012 3:19 PM by Leo Mrozek

Would be really helpful if the the images were READABLE!!! Some are so small that all you can see is a blur.

# re: Create and Consume WCF service using Visual Studio 2010

Monday, January 23, 2012 11:49 PM by sreejukg

@Leo Mrozek,

click on the images will give you bigger image view. Hope this clarifies your question

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, January 25, 2012 4:32 AM by vivek

good artical

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, January 25, 2012 10:00 AM by Prabakaran M

Its really very good to understand easily. Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, January 31, 2012 2:11 AM by ganesh

Excellent article...thnx

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, February 1, 2012 10:35 AM by Gutlapalli

I can't able to access the WCF service in console App. do you know why it i so??

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, February 2, 2012 5:56 AM by Sakander

Very nice one!

Thank you!

# re: Create and Consume WCF service using Visual Studio 2010

Friday, February 3, 2012 5:49 AM by raj

superbbbbb artical....

# re: Create and Consume WCF service using Visual Studio 2010

Saturday, February 4, 2012 3:13 AM by Nitin Kumar Dixit

Thank You.for given such helpful articles to beginner.

# re: Create and Consume WCF service using Visual Studio 2010

Monday, February 6, 2012 9:47 AM by tariq

very useful for a newbie like me, many thanks. the only thing i would say is that there is no 'WCF service' project type anymore? i think its called 'WCF Service Application' now...

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, February 9, 2012 3:14 AM by maks

thank you very much.It's a great blog.

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, February 9, 2012 11:58 AM by guillermo

hey, file is not being created so i have problems with references.

any help?

i can pass web.config from wcf if is needed

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 14, 2012 2:35 AM by Ranjith V

great work buddy. Thanks, very very useful.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, February 15, 2012 11:07 AM by Parth

Very helpful!!!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 21, 2012 1:09 AM by Rajesh

Thank you very much. This article is very useful for beginers.

I tried and it worked..

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 21, 2012 2:35 AM by Gaurav Dutt

Content is very helpful.

Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, February 21, 2012 11:59 AM by Seeryx

Thanks a lot.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, February 22, 2012 1:26 AM by Nitin

Thanks a Lot , it is very helpful for beginners

# re: Create and Consume WCF service using Visual Studio 2010

Friday, February 24, 2012 11:59 AM by Juan Iquise

Good... Bein explicado simple y sencillo. Muchas gracias por el ejemplo.

# re: Create and Consume WCF service using Visual Studio 2010

Friday, March 9, 2012 3:56 PM by Josi

Excelente explicación!!

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, March 14, 2012 11:31 AM by arvindmewara

Easy Language & Content is very helpful.

Thanks

# re: Create and Consume WCF service using Visual Studio 2010

Friday, March 16, 2012 2:10 AM by hitesh

it is a best reuqiremnt fullfillment

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, March 22, 2012 2:32 AM by Vijayan

Really good for beginners

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, March 22, 2012 2:56 PM by venkat

The type or namespace name 'HelloServiceClient' could not be found (are you missing a using directive or an assembly reference?)

can any one tell what reference should be added.

I have added the Service.Model reference.

# re: Create and Consume WCF service using Visual Studio 2010

Monday, April 2, 2012 7:13 AM by prabhulingayya

It is very very helpful for me to understand the WCF.

Great article .Thanks a lot.

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, April 3, 2012 2:35 AM by Hariharan

For Windows 7 svcutil.exe command Prompt:

Step1 : C:\>cd C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin

Step2 : C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin>svcutil /d:d:\temp http://loca

lhost:55292/Service1.svc

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, April 11, 2012 3:08 AM by DivyaBharathi

Thanks alot . bcz am a fresher in my company.So Am worried about how to do wcf programs.But now I understood easily

# re: Create and Consume WCF service using Visual Studio 2010

Saturday, April 14, 2012 12:15 PM by bal krishn shukla

please send me

# re: Create and Consume WCF service using Visual Studio 2010

Friday, April 20, 2012 8:31 AM by Vamsi

Very good post for beginners

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, April 24, 2012 3:57 AM by sssss

sss

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 2, 2012 2:51 AM by srinu

Very good post for beginners, iam trying this example ,when iam debug this i got this error:

the contract 'IMetadataExchange'in client configuration does not match the name in service Contract,or there is no valid method in this contract.

This is the error i got How can i Slove this Problem Please tell me the answer to this

Mail ID:svreddy2006@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 9, 2012 12:43 AM by Amila

thank you very much.

amila4d@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Monday, May 14, 2012 7:20 PM by EnrdjAsQoBHzqfCC

G0OIYh I really liked your article post.Really looking forward to read more. Great.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 16, 2012 6:02 AM by Cute

Very useful article..

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, May 17, 2012 7:05 AM by kuldeep

awesome post...very useful to understand wcf specially for beginners...

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, May 29, 2012 12:28 AM by Yogesh Kapase

Great article, for a beginners.

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, May 30, 2012 4:48 AM by sssss

Very good post buddy......

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, May 31, 2012 11:37 AM by Mortadelo

Nice post

Esay to reproduce, now i'm going to try to do another consuming an xml file and adding the data in the xml to a database

Cheers!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, June 5, 2012 9:59 AM by aarzayus

How can I get the code please

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, June 6, 2012 10:36 AM by Jose M

thank you very much. Its really good. thanks thanks thanks :)

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, June 12, 2012 3:06 AM by verendra

hello i need code .

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, June 19, 2012 6:24 AM by senthilsaravanan

Good one!

# re: Create and Consume WCF service using Visual Studio 2010

Tuesday, June 19, 2012 6:58 AM by tawaz

please send me the code. thngundu@yahoo.com

# re: Create and Consume WCF service using Visual Studio 2010

Wednesday, June 20, 2012 1:52 AM by Shaan

How do you consume this service with web-form?

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, July 19, 2012 7:03 AM by Shahzad

Could not find default endpoint element that references contract 'IHelloService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

# re: Create and Consume WCF service using Visual Studio 2010

Thursday, July 19, 2012 7:11 AM by Shahzad

cam anyone tell me where i am wrong....on my id shahzadbeg075@gmail.com

# re: Create and Consume WCF service using Visual Studio 2010

Monday, July 30, 2012 4:26 AM by aa

hmmm

# re: Create and Consume WCF service using Visual Studio 2010

Monday, August 6, 2012 10:19 PM by Cassidy

oh well, on line promotion also takes a lot of

work just like offline promotion of products and services“

# re: Create and Consume WCF service using Visual Studio 2010

Friday, August 10, 2012 1:08 AM by VJ

Today is the first day i was looking at WCF and this was very helpful. Thanks