?
Solved

REST web service in C#

Posted on 2010-01-03
7
Medium Priority
?
1,486 Views
Last Modified: 2012-05-08
Visual Studio 3.5 C#
New to REST, familiar with SOAP, New to Android OS
I need to create a very simple REST web service (in VS 3.5) for consumption by Android. I need an example that returns "Hello World". Please include a way to hit the service from the browser so I can see the output. I think with this I can figure out how to make it do more than just return a string.

Thanks!
Bob

0
Comment
Question by:lateapex
  • 4
  • 3
7 Comments
 

Author Comment

by:lateapex
ID: 26166646
I read these but I can't find an example of how to do this, load it on a webserver (I use a shared hosting IIS7) and it works.

Thanks
0
 
LVL 17

Expert Comment

by:CSecurity
ID: 26166682
See this also:
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx

Simply create your web service and upload result files in IIS7 folder. That's all
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 17

Expert Comment

by:CSecurity
ID: 26166735
Your hosting should allow you to do so. Then you can run servicemodelreg -i (or ask hosting provider to do so)

Then deploy your web service and it should work
0
 

Author Comment

by:lateapex
ID: 26166913
CSecurity,
You have me close, I have a service that outputs the correct XML in the browser.
I'm still confused about the hosting environment. I'm used to creating a dot net web site (with or without a web service) and publishing it to the wwwroot of the hosting service. Since the new service has it's own webconfig file, how do I include the new service in a site?
Thanks for your patience!
Bob
0
 
LVL 17

Accepted Solution

by:
CSecurity earned 2000 total points
ID: 26166922
As I said, if hosting provider allowed running web services and servicemodel is registered with IIS and ASP.NET and it's extensions installed in hosting, you can upload all files (web.config, all aspx and other necessary files) on a folder in your site. If you get 404, it means hosting provide doesn't allow it. Otherwise with a simple upload it will work perfect!
0
 

Author Closing Comment

by:lateapex
ID: 31672148
Thanks again!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

839 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