Click here to Skip to main content
11,921,353 members (65,509 online)
Rate this:
Please Sign up or sign in to vote.
How to create a JSON restful webservice in ASP.NET C# that connect to MS SQL Database and retrieve stored procedures values from the database?. I have all stored procedures, data access layers and business layer available in my project. But I do not know how to create restful web service and how to call stored procedures values.

This webservice will eventually be used to communicate with iPhone SDK. And results of this web service will be shown in iPhone application. This iPhone application will be installed on iphone , and it will interact web service to get database values.

Any help would be appreciated.

Posted 7-Dec-11 23:13pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Using .Net Framework 3.5 or above you can develop REST based Service. You may refer below links for more information on this.

For JSON and WCF REST Services.

However to develop REST Service, WCF support is not obligatory, you can develop REST Service even using simple HttpHandler or HttpModule.

Developing a REST Web Service using C# - A walkthrough

To call your SQL Server Stored Procedure you may use Ado.Net.
Rate this: bad
Please Sign up or sign in to vote.

Solution 5

For communicating iphone with restful web service which uses json as data, the best library is restkit:[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 6

Here's a pretty good walkthrough of creating your first JSON web service from scratch, loading and saving data from SQL Server, and even displaying it using JavaScript or on an iPhone:

[Creating a JSON Web Service]

I think that pretty much covers everything you were asking for !!!

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

  Print Answers RSS
0 OriginalGriff 538
1 Dave Kreskowiak 260
2 Sergey Alexandrovich Kryukov 173
3 phil.o 170
4 RyanDev 134
0 OriginalGriff 7,036
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,286
3 George Jonsson 2,840
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 4 Dec 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100