none
Automation server can't create object RRS feed

  • Question

  • Thanks for the reply. I did get farther on this issue. It seems that the MsRdpClient7NotSafeForScripting interface doesn't work with IE versions < 9. Nothing from MS, just what I found in subsequent troubleshooting. I've rolled back to the original, MsRdpClientNotSafeForScripting, and that seems to work on 9 & 8.

     

    On IE8, however, I still get prompted for a password, even though I've installed credssp and specified a clear text password in the interface call. Also, if I don't tinker with the DisplayWidth & DisplayHeight settings, IE versions < 9 get a tiny window in the center of the screen, while IE 9 gets a full window inside the browser. 

     

    On IE6 I get prompted to choose a digital certificate, but the dialog box doesn't list any certs! I press the 'Ok' button to get past it, and get my main web page. Then I click the link to get my rdp session, and get a blank page with this error: 

     

    Line: 7

    Char: 2

    Error: Automation server can't create object

    Code: 0

    URL: <url to rdp page>

     

    ...so apparently IE 6 doesn't like Windows Script Host??? Or is there something that I need to install?

     

    Thanks in advance for any advice/answers.

    Tuesday, November 22, 2011 10:33 PM

Answers

  • This appears to be an issue with browser zoom level or in the case of IE 6 browser text size. I coded some API/COM calls to force the browser to 100% zoom level or IE 6 text size to Normal and this seems to have fixed the problem.
    • Marked as answer by xboydavey Tuesday, March 20, 2012 3:28 PM
    Tuesday, March 20, 2012 3:28 PM

All replies

  • Additional info:

     

    I have created a page that uses javascripts to create a web portal to our app running on RDS for Server 2008. The scripts work fine if I'm using IE 9. If I'm using any earlier version of IE (i.e. 8, 7, 6) I get the error shown below:
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/15.0.874.121; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)
    Timestamp: Fri, 18 Nov 2011 13:57:56 UTC
    Message: 'SecuredSettings' is null or not an object
    Line: 86
    Char: 2
    Code: 0
    URI: <javascript href>.js
    I have diligently searched these and other forums and have tried every possible way to resolve this error.
    I have:
     Installed CredSSP support on xp sp3
     Validated the html & javascript to ensure there are no extra chars like commas hanging around
     Reset the browser many times.
     Turned off NLA on the server.
     ...and every other thing I can think of, but still can't get the secured settings object to instantiate. At this point I need help. Here are some script excerpts:
     var connectedScript = document.createElement('script');
     var connectedObj = document.createElement('object');
     var connArea = document.getElementById('connectArea');
     var WshShell = new ActiveXObject("WScript.Shell");
     var compname = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%");
     connectedScript.html = connArea.innerHTML;
     connectedObj.id = 'MsRdpClient7NotSafeForScripting';
     connectedObj.language ='javascript';
     connectedObj.classid ='CLSID:54D38BF7-B1EF-4479-9674-1BD6EA465258';
     connArea.appendChild(connectedObj);
     // initialize the rdp object
    var obj = document.getElementById('MsRdpClient7NotSafeForScripting');
    // object exists, connect to rdp
    obj.StartConnected = -1;
    obj.UserName = <user name>;
    obj.server = <server name>;
    obj.Domain = <domain name>;  
    obj.SecuredSettings.WorkDir = <working directory with escaped backslashes>;
    obj.SecuredSettings.StartProgram = <program path and filename with escaped backslashes>
    obj.AdvancedSettings6.ClearTextPassword = <password>;
    obj.AdvancedSettings6.AuthenticationLevel = 2;
    obj.AdvancedSettings6.EnableCredSspSupport = "True";
    obj.AdvancedSettings6.PublicMode = "True";
    obj.AdvancedSettings6.EnableAutoReconnect = "False";
    obj.AdvancedSettings6.DisableRdpdr = 0;
    obj.AdvancedSettings6.MaximizeShell = 2;
    obj.AdvancedSettings6.SmartSizing = "True";
    // Allow clipboard transfers
    obj.AdvancedSettings6.RedirectClipboard  = "True";
    //'Set keyboard hook mode to "Always hook" - only works on XP.
    obj.SecuredSettings3.KeyboardHookMode = 1;
    //'Display connect region
    document.getElementById('connectArea').style.display = "inline";
    //'Connect
    obj.Connect();
    Thanks for any assistance.
    DK

    Tuesday, November 22, 2011 10:48 PM
  • Ok got that working by changing the SecuredSettings.WorkDir property to the right directory.

    Now I have a different problem. This one I have seen a lot in testing, and have not been able to overcome, but I have at various times left it for other problems to solve. Now I've gone full circle and am back to this one.

    I have the RDS session scripted and working pretty well. In IE8 & 9 all is well. In IE 6 & 7 I get the <object> tag with the client area of the browser being taken up by a gray area that represents the rdp control, but the actual screen display for the rdp session is in a little bitty box centered in the middle of the rdp gray screen in the client area of the browser.

    In the code I first set the object tag width and height attributes with the dimensions of the client area. This results in the object tag creating/displaying the gray box that fills the client area of the browser.

    I've tried working with the MsRdpClientNotSafeForScripting's Height, Width, DisplayHeight, and DisplayWidth settings. 

    I've worked with the AdvancedSettings.SmartSizing and .MaximizeShell properties. 

    If I don't define the object tag dimension attributes, I don't get the gray box, and the rdp session gives me the same tiny box, but this time positioned in the upper left hand corner of the browser's client area.

    If anyone has some suggestions, please provide.

    Thanks.

    DK

     

    Wednesday, November 23, 2011 7:15 PM
  • Well, this is a strange one. I've been clearing the IE cache of all offline content, files etc and clearing the ssl state. Somehow IE has managed to cache some settings somewhere and not let them go. 

    At some point I set the size of DisplayWidth and DisplayHeight to the dimensions of the browser client area * 10, and voila! the display filled the client area! Don't know why I had to do that, but after that I could adjust the size back to just the client area dimensions and it still worked. I don't know if it worked because the dimensions * 10 setting is still cached, or what. 

    Would be great if an expert could explain this!

    Thanks.

    DK

     

    P.S. Note the 'Client Resolution' in the RDP Logon Status screen below:


    • Edited by xboydavey Wednesday, November 23, 2011 10:39 PM
    Wednesday, November 23, 2011 9:26 PM
  • And it's back... 200 x 200 resolution on the rdp session. Why???? Is there a server side setting that can be adjusted to fix this? Is this a bug in the COM interface to mstsc? Is there some austere setting that can be changed to fix this?
    • Marked as answer by xboydavey Tuesday, March 20, 2012 3:25 PM
    • Unmarked as answer by xboydavey Tuesday, March 20, 2012 3:28 PM
    Wednesday, November 23, 2011 11:10 PM
  • This appears to be an issue with browser zoom level or in the case of IE 6 browser text size. I coded some API/COM calls to force the browser to 100% zoom level or IE 6 text size to Normal and this seems to have fixed the problem.
    • Marked as answer by xboydavey Tuesday, March 20, 2012 3:28 PM
    Tuesday, March 20, 2012 3:28 PM