Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pavel Gabor 13 posts 53 karma points
    Sep 05, 2012 @ 12:15
    Pavel Gabor
    0

    Silverlight application doesent load in IE7

    Hi,
    We have Silverlight application nested inside Umbraco page. Application is working fine on IE8, IE9, FF and Chrome. But unfortunately it doesn’t work in IE7.
    In IE7 client side javascript error is thrown (I can see it when debugging with IE developer tools):
    Error: SCRIPT438: Object doesn't support this property or method
    Location: title = encodeURIComponent(document.title).replace(/\'/g, "\\'")
    Right after that another exception is thrown:
    SCRIPT5022: Unhandled Error in Silverlight 2 Application Exception occurred. (Exception from HRESULT: 0x80020009) at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
    at MS.Internal.XcpImports.Host_SetNavigationState(String state)
    at System.Windows.Interop.SilverlightHost.set_NavigationState(String value)
    at System.Windows.Navigation.Journal.UpdateNavigationState(JournalEntry journalEntry)
    at System.Windows.Navigation.Journal.AddHistoryPoint(JournalEntry journalEntry)
    at System.Windows.Navigation.NavigationService.CompleteNavigation(DependencyObject content)
    at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
    at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
    at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)

    The thing is, that Silverlight application is loaded without errors in IE7, if it is hosted in test page (not in Umbraco).
    On the bottom of post I included html sources from both pages
    Any help or suggestion would be appreciated.

    Page source (Umbraco) – error occurs:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8" />
    <title></title>

    <!-- Meta Data -->
    <meta name="title" content="" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />

    <!-- All JavaScript at the bottom, except this Modernizr build.
    Modernizr enables HTML5 elements & feature detects for optimal performance.
    Create your own custom Modernizr build: www.modernizr.com/download/ -->
    <script src="/scripts/modernizr-2.5.3.min.js"></script>


    <!-- TODO: remove -->
    <link rel="stylesheet" type="text/css" href="/css/Reset.css"/>
    <link rel="stylesheet" type="text/css" href="/css/960.css"/>
    <link rel="stylesheet" type="text/css" href="/css/MainStyles.css"/>
    <link rel="stylesheet" type="text/css" href="/css/SilverlightHost.css"/>
    <link rel="stylesheet" type="text/css" href="/css/Search.css"/>


    <script type="text/javascript" src="/scripts/silverlight.js"></script>

    <script type="text/javascript">
    function onSilverlightError(sender, args) {
    var appSource = "";
    if (sender != null && sender != 0) {
    appSource = sender.getHost().Source;
    }

    var errorType = args.ErrorType;
    var iErrorCode = args.ErrorCode;

    if (errorType == "ImageError" || errorType == "MediaError") {
    return;
    }

    var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";

    errMsg += "Code: " + iErrorCode + " \n";
    errMsg += "Category: " + errorType + " \n";
    errMsg += "Message: " + args.ErrorMessage + " \n";

    if (errorType == "ParserError") {
    errMsg += "File: " + args.xamlFile + " \n";
    errMsg += "Line: " + args.lineNumber + " \n";
    errMsg += "Position: " + args.charPosition + " \n";
    }
    else if (errorType == "RuntimeError") {
    if (args.lineNumber != 0) {
    errMsg += "Line: " + args.lineNumber + " \n";
    errMsg += "Position: " + args.charPosition + " \n";
    }
    errMsg += "MethodName: " + args.methodName + " \n";
    }

    throw new Error(errMsg);
    }
    </script>


    </head>
    <body>

    <div class ="silverlightAppContainer">
    <div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
    <param name="source" value="/media/9362/Astrea.Aipa.RegisterAVDel.Silverlight.xap"/>
    <param name="onError" value="onSilverlightError" />
    <param name="background" value="white" />
    <param name="minRuntimeVersion" value="5.0.61118.0" />
    <param name="autoUpgrade" value="true" />
    <a href="https://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
    <img src="https://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
    </a>
    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>


    <nav class="silverlightHostNavigation">
    <div class="left">
    <a class="backLink" href="/uporabniske-strani.aspx">&lt;- Uporabniske strani</a>

    </div>
    <div class="right">
    <a class="backLink" href="/">Zavod AIPA</a>

    </div>
    </nav>
    </div>

    </body>
    </html>

  • Pavel Gabor 13 posts 53 karma points
    Sep 05, 2012 @ 16:18
    Pavel Gabor
    0

    I was able to eliminate cause for error after I found this topic: http://forums.silverlight.net/p/177855/650102.aspx/1?p=True&t=634824360406567853.

    Error vanished after I removed meta title tag. I’m not sure any more that this is Umbraco issue.

     

Please Sign in or register to post replies

Write your reply to:

Draft