Access Denied error when using RDP client container(WebView) from C# app RRS feed

  • Question

  • I have a C# app with a webview. Using the following code I am loading a webpage with javascript containing RDP client container.

    var html = await Windows.Storage.PathIO.ReadTextAsync("ms-appx:///Assets/RDPContainer/RDPContainer.html");

    RDPContainer.html source is below

    <!DOCTYPE html>

    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <meta charset="utf-8" />
         <script type='text/javascript'>
             var desktopWidth = 1024;
             var desktopHeight = 768;
             function ShowRDPClient() {
                 var clientControlObject = document.createElement("object");
                 // Register for ActiveX events.
                 clientControlObject.addEventListener("readystatechange", function (e) {
                     if (clientControlObject.readyState !== 4) {
                 }, false);

                 clientControlObject.addEventListener("error", function (e) {
                 }, false);
                 clientControlObject.classid = "CLSID:EAB16C5D-EED1-4E95-868B-0FBA1B42C092";
                 clientControlObject.id = "clientControl";
                 clientControlObject.width = desktopWidth;
                 clientControlObject.height = desktopHeight;
                 var bodyRegion = document.getElementsByTagName("body");

                 clientControlObject.Settings.SetRdpProperty("Full Address", "");
                 clientControlObject.Settings.SetRdpProperty("DesktopWidth", desktopWidth);
                 clientControlObject.Settings.SetRdpProperty("DesktopHeight", desktopHeight);

    <body onload='ShowRDPClient();'>

    I am getting an "Access denied" exception when setting the classid. If I use the above code in Javascript metro application, it works fine.


    • Edited by SMNW Tuesday, November 20, 2012 1:00 AM
    Tuesday, November 20, 2012 12:50 AM


All replies