Geeks With Blogs
Scott Spradlin Developer Community Enthusiast

You've been there.  "It works on my box!"  Our new SharePoint web parts don't work in production!

This project called for a suite of data entry grids inside custom SharePoint web parts.  The customer already owned Infragistics' NetAdvantage for ASP.NET so I used their UltraWebGrid.  Very slick and easy to deploy with your custom web parts.

The primary feature they wanted was the cool Excel-like cut-n-paste functionality but that wasn't working in our production environment.  At the beginning of the project, the client said "Oh, we already have AJAX things running in that's installed and ready to go."  Silly me, I didn't follow through and verify it.  My solution installed without the infamous "The Web Part you attempted to add no longer exists in the Closed Web Parts Gallery" helpful error message...which means that all the dlls that I'm referencing apparently are there.

After the page loads -- apparently successfully -- and we mouse over the grid, we see the tiny little error message down in the corner of the browser.  Digging deeper I see that JavaScript has encountered a problem and is helping me out by saying "Object Expected".  Even gives me the line where this object is expected.  It's the line that is 65 million characters long that contains all the html for the grid.  So, IE knows the object it's expecting, why can't it share that tidbit?

Well, we know it's event oriented because the error happens when the mouseover should be firing.  Maybe the JavaScript code that's supposed to fire isn't being loaded properly I say to myself. (Infragistics cleverly bundles all the JavaScript support files as embedded resources so there's no additional headache of distributing them, setting permissions, etc.)  So it looks like it's loading them but apparently it's not.

Specifically, one of the changes you're instructed to make to the web.config for AJAX installation supports the callbacks for embedded scripts through ScriptResource.axd.

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

Someone had not updated the web.config on the production web front end to include all the changes needed for complete AJAX support.  Thanks buddy.  :)

I made the seven little changes and bingo -- success.

Technorati Tags: ,,
Posted on Tuesday, April 22, 2008 11:06 AM SharePoint | Back to top

Comments on this post: Debugging Half-Installed-AJAX on SharePoint

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Scott Spradlin | Powered by: