如何在ASP.NET C#2.0 Framework中创建JSON静态Web服务 [英] How to create a JSON restful webservice in ASP.NET C# 2.0 Framework

查看:120
本文介绍了如何在ASP.NET C#2.0 Framework中创建JSON静态Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是.net的新手,并且我对.net没太多经验.所以任何人都可以告诉我,如何在ASP.NET C#中创建一个连接到MS SQL 2005数据库并检索存储的JSON RESTful Web服务数据库中的过程值?.

该Web服务最终将用于与iPhone SDK通信.该Web服务的结果将显示在iPhone应用程序中.

任何帮助将不胜感激.

I am new in .net, and I do not have much experience in .net.So anybody can tell me ,how to create a JSON restful web service in ASP.NET C# that connect to MS SQL 2005 Database and retrieve stored procedures values from the database?.

This web service will eventually be used to communicate with iPhone SDK. And results of this web service will be shown in iPhone application.

Any help would be appreciated.

Thanks!

推荐答案

我对先前问题的解决方案涉及此主题.

如何在ASP中创建JSON Restful Web服务. NET C#连接到MS SQL数据库并从数据库中检索存储过程的值?

此解决方案基于您的评论.
My solution to your earlier Question covers this topic.

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?

This solution based on your comments.
报价:

@RaisKazi,我不能使用.net 3.5或4.0.我必须在.net 2.0中制作此Web服务..NET2.0可以不支持WCF.

@RaisKazi, I cannot use .net 3.5 or 4.0.I have to make this webservice in .net 2.0.And .NET 2.0 does not support WCF.


您可以参考下面的链接来获得有关REST的想法.

http://en.wikipedia.org/wiki/Representational_state_transfer

要开发REST服务,不需要WCF支持,甚至可以使用简单的 HttpHandler HttpModule 来开发REST服务.[从我以前的解决方案中复制,因为事实是不变的.]

您可以参考下面的文章,该文章很好地解释了如何使用简单的 HttpHandler 开发REST服务.

使用C#开发REST Web服务-演练


You may refer below link to get idea about REST.

http://en.wikipedia.org/wiki/Representational_state_transfer

To develop REST Service, WCF support is not obligatory, you can develop REST Service even using simple HttpHandler or HttpModule.[Copied from my earlier solution as fact remains the same.]

You may refer below article which very well explains, how to develop REST service using simple HttpHandler.

Developing a REST Web Service using C# - A walkthrough


这篇关于如何在ASP.NET C#2.0 Framework中创建JSON静态Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆