简体   繁体   English

如何使用.NET 3.5和Visual Studio 2010构建WCF REST服务?

[英]How to build WCF REST services with .NET 3.5 and Visual Studio 2010?

I'm about to build some RESTful web services using WCF and .NET 3.5 in VS2010. 我将在VS2010中使用WCF和.NET 3.5构建一些RESTful Web服务。 I've not done this before so am looking for some pointers as to the easiest approach. 我之前没有做过此事,因此正在寻找一些有关最简单方法的指导。

For deployment reasons I cannot use .NET 4 but must stick with .NET 3.5 SP1. 出于部署原因,我不能使用.NET 4,但必须坚持使用.NET 3.5 SP1。 It seems the WCF REST Starter Kit doesn't work with VS 2010 (I'm not certain about this - maybe it's just the project templates don't work), and people generally use the stuff found in .NET 4.0 instead. 似乎WCF REST入门工具包不适用于VS 2010(对此我不确定-也许只是项目模板不起作用),人们通常使用.NET 4.0中的内容。 I've not build REST services before, but based on this fantastic article ( A Guide to Designing and Building RESTful Web Services with WCF 3.5 ) it seems like the starter kit classes do a bunch of useful plumbing that will save me time instead of using the base classes. 我以前没有构建过REST服务,但是基于这篇精彩的文章( 《使用WCF 3.5设计和构建RESTful Web服务指南》 ),入门工具包类似乎做了很多有用的工作,可以节省我的时间,而无需使用基类。 My question is: should I try to use these helper classes that come with the WCF REST Starter Kit or should I just use the standard WCF classes? 我的问题是:我应该尝试使用WCF REST Starter Kit附带的这些帮助程序类还是仅使用标准WCF类?

The RSK preview is not production quality - so I would go for the vanilla WCF 3.5 WebHttpBinding-style service. RSK预览不是产品质量-所以我会选择香草WCF 3.5 WebHttpBinding样式的服务。

Pablo "cibrax" Cibraro wrote a great blog post a few days ago regarding different Microsoft stacks available to write RESTful services: http://weblogs.asp.net/cibrax/archive/2010/10/08/asp-net-mvc-wcf-rest-and-data-services-when-to-use-what-for-restful-services.aspx Pablo“ cibrax” Cibraro几天前写了一篇很棒的博客文章,内容涉及可用于编写RESTful服务的不同Microsoft堆栈: http ://weblogs.asp.net/cibrax/archive/2010/10/08/asp-net-mvc- WCF的休息和数据服务,当使用的,无论什么样的,宁静的,services.aspx

--larsw --larsw

FWIW我们确实使用了WCF REST入门套件,但没有发现任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM