Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
Hi All

As I am new to WCF, Can you please tel me how to create a web API using WCF and use it in an application.

Ex.
http://www.ss.com/dds/fr?data="xxx"&action="test"

How can we create above API and use it in ?????
Also please provide the working example if possible.
Please let me know....



Thanks.
Posted

Web API and WCF are not actually the same thing.
Web API is an open source for building REST ful services over the .NET Framework

Look at the difference between WCF and Web API
http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html[^]

Here are some samples -
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api[^]

Detailed Tutorial for Building ASP.NET WebAPI RESTful Service[^]

A Beginner's Tutorial for Understanding and Implementing ASP.NET Web API[^]

Hope this gives you a much better idea to start working with Web AOI.

Cheers
Sandip
 
Share this answer
 
Comments
mayank.bhuvnesh 20-Feb-14 0:33am    
Can u tell me which will be the best way to achieve this

http://www.ss.com/dds/fr?data="xxx"&action="test"

Also to pass parameters I have to use JSON or it can be done another way????
[no name] 20-Feb-14 3:09am    
nice link....
Can u tell me which will be the best way to achieve this

http://www.ss.com/dds/fr?data="xxx"&action="test"

Also to pass parameters I have to use JSON or it can be done another way????
 
Share this answer
 
 
Share this answer
 
Hey I have gone thru the example it's just displaying all the products list in an XML format.

My concern is I have to share API with some of my clients so that the can send data using post Parameters

http://www.ss.com/dds/fr?data="xxx"&action="test"

Like in above data and action are two post parameters.

What i am trying is to create two different API's one for XML and another for HTTP.

This is a live HTTP api running

http://alert.smsactiva.com/api/sendhttp.php?authkey=YourAuthKey&mobiles=9999999999,919999999999&message=message&sender=senderid&route=1

I am trying to create same like dis

Can u plz help me on this....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900