Creating JSON-enabled WCF services in .NET 3.5(pluralsight.com)

submitted by brianjlowrybrianjlowry(640) 4 years ago

From Fritz Onion.

3 comments |category: |Views: 56

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by brianjlowrybrianjlowry(640) 4 years ago 0

Not to be confused with the other article entitled with the same name, this is an update to that article where Fritz shows that JSON-enabling WCF can be done with one line in the config.

Reply

posted by JemmJemm(9604) 4 years ago 0

Yeah, I noticed this before the other article, but I thought it was more thorough. Also the method described in this post requires one to embed the whole service class right into the .svc file instead of code-behind (not something that I would do in production code)

Reply

posted by brianjlowrybrianjlowry(640) 4 years ago 0

"Unfortunately, there is no wizard to generate a simple service like this in VS 2008. The best way to use this approach is to generate an Ajax-enabled WCF Service using the wizard, then delete all of the configuration goo it adds to web.config and manually add the Factory="…" attribute to your .svc file. You'll still be using the code-behind model, but you probably should be anyway since it keeps all your code in a single place in the site."

Not sure I follow you... it seems as though the code-behind model is enforced...

Reply

information Login or create an account to comment on this story