Pages

Monday, June 2, 2014

Bug in SharePoint 2013 for Public Facing Sites - Popup message to Run ActiveX Controls

Recently in one of my SharePoint 2013 project which is Public Facing Site faced an issue of "The Web site wants to run the following add-on: 'Name ActiveX Control".


The SharePoint plugin that those web sites try to load is only useful for collaboration but not for public facing web sites.



Issue in Default SharePoint Javascript Files:-
The actual code will look like this in init.js file, which can be found inTemplates\Layouts\15\1033


function ProcessImn() {
if (EnsureIMNControl() && IMNControlObj.PresenceEnabled) { imnElems=document.getElementsByName("imnmark"); imnElemsCount=imnElems.length; ProcessImnMarkers(); }
}

function ProcessImnMarkers() {
for (i=0;i<imnMarkerBatchSize;++i) { if (imnCount==imnElemsCount) return; IMNRC(imnElems[imnCount].sip,imnElems[imnCount]); imnCount++; } setTimeout("ProcessImnMarkers()",imnMarkerBatchDelay);
}

Work Around Solution:-
Two ways you can go, one is

Comment all the above lines.Search for the function ProcessDefaultOnLoad() in the init.js file. Comment the ProcessImn() function. Now execute. Warning will no more display.


The other way and Preferred method will be,
Add below two Javascript Lines in your master Page,


function ProcessImn() {}
function ProcessImnMarkers() {}


Now for end user will not popup the The Web site wants to run the following add-on: 'Name ActiveX Control"





for more info:- http://support.microsoft.com/kb/931509

No comments:

Post a Comment