Search Wiki:
Resource Page Description
This Resource contains code samples from a presentation I gave at Tech Ed North America, Developers Week, 2008. Description of Presentation follows...

What do you need to know to build powerful solutions for interactive content syndication using .NET? This session offers tips and techniques to deliver content that can be easily consumed across multiple sites and domains. See how to leverage HttpHandlers in .NET to build a cacheable, interactive Web “widget” and discuss pros and cons including cross-domain issues, intellisense, performance and page load, accessing request variables and cookies, and more.

Note: I am working on an article that covers the information from the presentation. The article should be completed by end of week, June 20. I will post an update here when done.


Part One of a walkthrough is now posted on my blog here: http://blogs.msdn.com/pajohn/archive/2008/06/18/web-widgets-with-net-part-one.aspx

Part Two is here: http://blogs.msdn.com/pajohn/archive/2008/06/25/web-widgets-with-net-part-two.aspx
Last edited Jun 26 2008 at 3:13 AM  by pajohn, version 5
Comments
pajohn wrote  Jun 18 2008 at 2:23 AM  
There was a small issue with Demo1 that I fixed today. It was not wired up to output the contents of core.js file, but that is now fixed and uploaded.

reedstone wrote  Jun 18 2008 at 1:39 PM  
After I downloaded and built both demos in VS2008, I just got a blank web-page in each case with no controls on it. Demo1 also showed a warning message in the Error List - File 'eventswidget.jss' was not found. The code files look intriguing, but it looks like something is missing - perhaps its your presentation I need?

pajohn wrote  Jun 18 2008 at 9:11 PM  
Hi readstone, you are probably missing a step that is in the presentation. Most likely involving setting up an HttpHandler. I've posted part one of the article on my blog here: http://blogs.msdn.com/pajohn/archive/2008/06/18/web-widgets-with-net-part-one.aspx

This blog post will take you through the steps to get Demo1 running. I am working on Part Two, which will be aligned with Demo2, and should be posted by next week. Hope that helps!

ysawant wrote  Aug 14 2008 at 2:33 AM  
hi pajohn,
I don;t have IIS 7.0 so i won't be able to use the wizard mentioned in part1 for adding managed handle. The OS is XP Professional and VSS 2008 Team Development Edition.
For now I have configured the widget handler manually in application web.config. But still the page is coming blank and handler is not invoked. Can you help me resolving this issue.
Following is added to web.config of the application under <httphandlders>
<add path="eventswidget.jss" verb="*" type="Demo1.Handlers.WidgetBase,Demo1" />
Thanks in advance

apbandi wrote  Sep 2 2008 at 10:13 PM  
Paul,
I am having similar issue as ysawant, running on my dev box with XP Professional. I was hoping the following web.config entry would have similar result in registering the custom managed handler but that doesn't seem to be working. Please advise. (BasicWidget=Demo1)

<httpHandlers>
<add verb="*" path="eventswidget.jss" type="BasicWidget.Handlers.EventsWidget"/>
</httpHandlers>

pajohn wrote  Sep 9 2008 at 4:06 AM  
ysawant and apbandi, thanks for the responses. This is great feedback and something I had overlooked! Both of your handler mappings look good for IIS 7.0, but IIS 6.0 actually stores the handlers in a different web.config section. Try something similar to the following...

<system.web>
<httpHandlers>
<add verb="GET,HEAD" path="eventswidget.jss" type="Demo1.Handlers.WidgetBase, Demo1" validate="false" />
</httpHandlers>

</system.web>

(note, I haven't verified this configuration yet on XP, but will find a machine to do so asap!)

christosch wrote  Feb 8 2010 at 8:28 PM  
I also get a blank page even when i add the http handler in web.config. Visiting this http://localhost:11666/demo2/eventswidget.jss i get an exception System.MissingMethodException: Cannot create an abstract class. Can you help me?

Updating...
Page view tracker