tags:

views:

234

answers:

2
+3  Q: 

REST kit for .Net?

I just started to explore RESTful service by using .Net C#. At CodePlex, there is WCF REST Startkit available. I watched several Screen-casts by Pluralsight. The demos are very cool but they are based on the Startkit Preview 1.

I downloaded the newest version of Preview 2. It looks like that some classes such as Service.basic.svc.cs is not available. Service.basic.svc.cs provides open codes so that you can change its implementation, endpoint templates, help descriptions and others. This missing part makes it hard to customize my templates, implementations and help descriptions. Maybe the new Preview 2 have a different structure o alternative ways to achieve the same results. However, I just cannot find any further information about those.

Anyway, WCF REST Startkit is still in preview version. Not sure when the final release will be available and not sure if it will be free and open.

Does anyone have experience with the Preview 2 and knows those changes and alternatives? Or is there other REST library (open source based) for .Net or ASP.NET?

A: 

It works fine for me with Preview 2. However I've heard of cases where if the install fails quietly then you need to uninstall and reinstall the starter kit.

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:
Preet Sangha
do you have Service.basic.svc.cs class available under the Service.svc? I miss this class. the basic cs file contains actual codes for AtomPubServiceBase and IAtomPubService which you can modify.
David.Chu.ca
It looks like part of your code was cut off.
John Saunders
+2  A: 

"Or is there other REST library (open source based) for .Net or ASP.NET?"

OpenRasta

Darrel Miller
-1 for just posting a link, and not even saying why the link is relevant.
John Saunders
That's OK. People have their preference to offer answers. It is very interesting library. It is based on resources, hander and codec. It looks the library offers REST get/post very well and clean in terms of resources. However, Atom/RSS feature is not available yet.
David.Chu.ca
Sorry John. I figured if someone read the question it would be obvious which part of the question I was answering.
Darrel Miller
Wow John, that's a terrible reason to downvote. The link was pretty self-explanatory. Maybe I would agree with you if you even posted an answer, but without that, what did *you* add to this thread??
John Sheehan
I did add the quote after John made the comment. Previously I only had the link. He was right to comment, as I had been lazy. As for the downvote, I would rather people be overly aggressive at downvoting than the other way round. I dislike communities that are too scared to criticize.
Darrel Miller