Click here to Skip to main content
12,954,403 members (92,039 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 22: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
Top Experts
Last 24hrsThis month
OriginalGriff 6,524
CHill60 3,490
Maciej Los 3,123
ppolymorphe 2,030
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 4 Dec 2013
Copyright © CodeProject, 1999-2017
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