Solved

ASP.NET REST Servics Calls

Posted on 2013-06-11
4
168 Views
Last Modified: 2013-06-15
I found a nice article here. The problem is no explanation for 'Calling' the service from a client.

http://www.codeproject.com/Articles/426769/Creating-a-REST-service-using-ASP-NET-Web-API?msg=4323046#xx4323046xx
0
Comment
Question by:WorknHardr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39238767
It's WEB API, which is styled similar (built upon?) the MVC Framework that Microsoft developed. You would use standard HTTP "conversations" to interact with the service. If you look at the comments in some of the controller snippets, you will see that some of the use a GET verb, and the corresponding URI is shown as well. For the snippet I linked, you could do something like this in the browser address bar:


...since a browser will send a GET by default. You could also use Fiddler to get a bit fancier with POSTs and PUTs, if the tutorial demonstrates those (I haven't checked).
0
 

Author Comment

by:WorknHardr
ID: 39238844
I suppose using WebClient or HttpWebResponse like the following code snippet would be the correct consuming methodology?


using System.Net;

string url = String.Format("http://localhost/task);

WebClient serviceRequest = new WebClient();

string response = serviceRequest.DownloadString(new Uri(url));
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39238948
In code, yes you could use either of those. There is also HttpClient available, with which you can do asynchronous processing.
0
 

Author Closing Comment

by:WorknHardr
ID: 39250469
Thank you
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question