SharePoint – Name ActiveX Control error.

image

 

This error pops up on SharePoint MOSS publishing websites that are in the Internet security zone for IE browsers.

This is because the core.js file wants to use ActiveX control “name.dll”, this ActiveX control is responsible for the presence information for SharePoint.

In the Internet security zone, IE pops this question to the user to ask them whether they want the ActiveX to run.

In development

For developers, if you have accidentally clicked “Yes Allow it to run”, then you won’t see this error and it can hinder your debugging of your public SharePoint site.

This is a RegEdit fix to get rid of this key to see name.dlll ActiveX warning in IE again.

HKCU\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{E18FEC31-2EA1-49A2-A7A6-902DC0D1FF05}

I have been told that some server machines doesn’t seem to have this key.

UPDATE try: HKCU\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{E18FEC31-2EA1-49A2-A7A6-902DC0D1FF05}

Fix


  1. MS has a KB article that shows you a broken way of fixing this.  It doesn’t work.
  2. We’ve found two other ways that are slightly better, one way is to override the JavaScript function that calls this – you have to be careful of the timing of which events are called first.
  3. The other way is to implement a HTTP output module to strip the reference to core.js from the output stream.  This can only be done safely for anonymous users, as core.js contains required JavaScript that is necessary for content editing.

Javascript - jQuery + ASP.NET – post-AJAX events

From jQuery, we get $(document).ready which is wonderful.
From ASP.NET, we get the UpdatePanel control which is fantastic.

 

One of the common problems that people have is regarding how to re-run the scripts after the UpdatePanel ajax update.

Here is one javascript-based solution – I consider these less intrusive than the code-behind solution with ClientScript.

Disclaimer – I learn this from previous projects I’ve worked on with personal experimentation – but I have not since read much documentation.

 

Original:

$(document).ready( function() {
$("a.link").css("border", "1px solid red");
})


The improved:

function setupLinkBorder( parentElement ) {
$("a.link", parentElement).css("border", "1px solid red");
}
$(document).ready( function() {
if (Sys &&
Sys.WebForms &&
Sys.WebForms.PageRequestManager &&
Sys.WebForms.PageRequestManager.getInstance()) {

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function(src,args){
setupLinkBorder(args.get_panelsCreated()); // when UpdatePanel are first loaded
setupLinkBorder(args.get_panelsUpdated()); // when UpdatePanel are loaded via AJAX
});
}
})



  1. Split out the actual script into a separate function
  2. Make sure you have a Sys.WebForms.PageRequestManager.getInstance() object – the code for this part was a bit scary.
  3. Add event handler to handle pageloaded event fired by ASP.NET (which occurs for UpdatePanel update as well)
  4. Rely on the parent element property of jQuery to limit jQuery selector to elements within the updated panel only.  This ensures you don’t fire the jQuery code on elements that are outside of the UpdatePanel – which can be bad.

re: Dell Newsletter

After reading yet another Dell monthly newsletter, I decided to reply to it.  I figure it’s rant-worthy.

Hi Mr Dell,

When I purchased my laptop, I was after a couple of spare 9-cell battery for longer battery life, and I was told it was out of stock, which is fair enough – these things go out of stock from time to time.

I specifically left instructions that when they are in stock, I would like to be notified.

Because I _really_ want them.

It has since been 6 months, and I find it hard to believe that they are still out of stock.

I think it’s good customer relationship management to:

1. give me an update on what's going on

2. you may need to fix your CRM software, because I think these are simple instructions that should have been followed up on at least every 3 months - especially since the customer is already telling you he wants to spend the money

3. you should already know which laptop model that I bought from you, and that which I've specifically told the sales girl to put down a note that I want the better batteries for this laptop.

jliu

SharePoint - Cannot get ghost document

We chased a fun bug in the afternoon after we deployed our new package to our staging server.

Symptom:

Our customized Content Query Web Parts stops rendering.
But we noticed they were still functioning when we drop into edit mode.

Hint:

This gave us the hint that our XSL was probably stuffed – but it checked out ok in SharePoint designer*.

Detective Work:

Digging through the SharePoint logs, we came across two lines that are incredibly suspicious:

0x17C4    Windows SharePoint Services       Web Parts                         89a1    Monitorable    Error while executing web part: System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred at (1,482). ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.     at System.Net.HttpWebRequest.GetResponse()     at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)     at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)     at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)     at Microsoft.SharePoint.WebPartPages.WSSXmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)     at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)     at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(Uri uri, Boolean include...    

0x17C4    Windows SharePoint Services       General                           72ks    Medium      Cannot get ghost document:

Features\blah\blah.xsl    

Story:

The path to the XSL was familiar, and the problem immediately became apparent.  It was the old path, we’ve since re-organized our deployment package, and that old path to the xsl file no longer works.

The Fix:

Drop into Style Library\ and delete all the XSL files that are ghosted.
Deactivate and reactivate the XSL feature so they get re-ghosted.

Notes:

SharePoint designer must have cached the file at some point, so it was happily showing us a copy of the file while in reality due to our re-organization of the feature it wasn’t actually available anymore.

Re-organizing feature package always has hidden costs…