我刚刚开始使用.Net C#来探索RESTful服务。在CodePlex,有WCF REST Startkit可用。我看了Pluralsight的几个屏幕投射。演示非常酷,但它们是基于Startkit Preview 1的。
我下载了预览版2的最新版本。看起来像Service.basic.svc.cs这样的类是不可用的。Service.basic.svc.cs提供了开放的代码,以便您可以更改其实现、端点模板、帮助描述等。这个缺失的部分使得定制我的模板、实现和帮助描述变得困难。也许新的预览版2有不同的结构和替代方法来实现相同的结果。然而,我就是找不到关于这些的任何进一步的信息。
无论如何,WCF REST Startkit仍处于预览版。不确定最终版本何时可用,也不确定它是否免费开放。
有没有人有使用Preview 2的经验,并知道这些变化和替代方案?或者,是否有其他适用于.Net或ASP.NET的REST库(基于开源)?
发布于 2009-08-29 14:02:53
“或者是否有另一个适用于.Net或ASP.NET的REST库(基于开源)?”
发布于 2009-08-29 05:04:11
但是我听说过,如果安装失败,你需要卸载并重新安装初学者工具包。
namespace MySimpleService {
// TODO: Modify the service behavior settings (instancing, concurrency etc) based on the service's requirements. Use ConcurrencyMode.Multiple if your service implementation
// is thread-safe.
// TODO: NOTE: Please set IncludeExceptionDetailInFaults to false in production environments.
[ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service : AtomPubServiceBase, IAtomPubService {
// TODO: These variables are used by the sample implementation. Remove if needed
#region variables used in sample implementation
const string xxx= "xxxx";
List<SyndicationItem> booksmarkEntries = new List<SyndicationItem>();
Dictionary<string, byte[]> collection1MediaItems = new Dictionary<string, byte[]>();
Dictionary<string, string> collection1ContentTypes = new Dictionary<string, string>();
#endregion
public Service() {
AddEntry("Main", "http:https://stackoverflow.com/questions/1350469
复制相似问题