Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I get the following error trying to use the Sharepoint multi upload functionality on a 64 bit system with Office 2010. it works fine on a 64 bit system with 2007 and on a 32 bit with 2010. But it throws the following with 64 bit 2010. All operating systems are Windows 7. Same server for all tests.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at STSUpld.UploadCtl.GetFormInformation()
   at STSUpld.UploadCtl.OnLoad(EventArgs e)
   at System.Windows.Forms.UserControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.UserControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
stsupld
    Assembly Version: 14.0.0.0
    Win32 Version: 14.0.4761.1000
    CodeBase: file:///C:/PROGRA~2/MICROS~1/Office14/STSUPLD.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
stsupld.intl
    Assembly Version: 14.0.0.0
    Win32 Version: 14.0.4761.1000
    CodeBase: file:///C:/PROGRA~2/MICROS~1/OFFICE14/1033/stsupld.intl.DLL
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------
share|improve this question
add comment

4 Answers

If I'm following you, the reference to 2010 32 and 64 bit are in reference to Office and not SharePoint since SharePoint only comes in 64bit flavors. Office 2010 64-bit is not ready for primetime and most recommend staying away from it unless you need the large datasets supported in Excel. There are still serious issues in Outlook and with the integration with SharePoint. I, and many others, only use the 32-bit version even with a 64-bit OS like Win7.

share|improve this answer
add comment

I am having the same problem. It works fien with Office 2007. You should set the "destination" parameter in the code that solves the javascript issue but I am having some problem in reading the files.

share|improve this answer
add comment

has anyone found anything else on this? the strangest thing for me is that this error only happens on some machines and not others. all are running iE8 same versions with the same settings and policies. on the machines it works, i do not have a hidden input tag of "destination" but still it works perfectly fine. based on the code i dissambled below i dont understand how it works becaue it should throw a null ref error when it tries to access the value for the "destination" input tag. Either that or the container (this.m_doc3 == null) which makes no sense.

when i do add the "destination" input tag, although the error doesn't come up, uploads are not working. simply put, it is not posting to where i expect to be. It also doesn't go to the "Confirmation-URL".

I've dissambled STSUpld.dll and here is the method GetFormInformation()

private void GetFormInformation()
{
    object obj2 = base.GetType().GetInterface("IOleObject", true).InvokeMember("GetClientSite", BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance, null, this, null, CultureInfo.InvariantCulture);
    this.m_oleClientSite2 = obj2 as IOleClientSite;
    IOleContainer container = this.m_oleClientSite2.GetContainer();
    this.m_doc2 = (IHTMLDocument2) container;
    this.m_doc3 = (IHTMLDocument3) container;
    if ((this.m_cancelbuttonid == null) || (this.m_okbuttonid == null))
    {
        foreach (IHTMLElement element in this.m_doc3.getElementsByTagName("input"))
        {
            if (string.Compare(element.getAttribute("type", 0).ToString(), "button", StringComparison.OrdinalIgnoreCase) == 0)
            {
                if (element.getAttribute("AccessKey", 0).ToString() == "O")
                {
                    this.m_okbuttonid = element.id;
                }
                else if (element.getAttribute("AccessKey", 0).ToString() == "C")
                {
                    this.m_cancelbuttonid = element.id;
                }
            }
        }
    }
    if (this.m_doc3 != null)
    {
        IHTMLInputHiddenElement element2 = (IHTMLInputHiddenElement) this.m_doc3.getElementById("destination");
        this.m_destination = element2.value;
        if (!this.m_destination.EndsWith("/", StringComparison.OrdinalIgnoreCase))
        {
            this.m_destination = this.m_destination + "/";
        }
    }
    if ((this.m_fullUrl == null) || (this.m_hostUrl == null))
    {
        this.m_fullUrl = this.m_doc2.url;
        IHTMLLocation location = this.m_doc2.location;
        this.m_hostUrl = location.protocol + "//" + location.host;
    }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.