2

I'm using the pattern Tim Heuer outlines here for my Silverlight 4 OOB installation pattern:

http://timheuer.com/blog/archive/2009/08/12/silverlight-out-of-browser-force-install-pattern.aspx

Here is my app's *Application_Startup* method:

private void Application_Startup(object sender, StartupEventArgs e)
    {
        //string _USERID = e.InitParams["UserAccount"];
        if ((App.Current.InstallState == InstallState.Installed) && (!App.Current.IsRunningOutOfBrowser))
        {
            this.RootVisual = new Installed();
        }
        else if (!App.Current.IsRunningOutOfBrowser)
        {
            this.RootVisual = new Installer();
        }
        else
        {
            this.RootVisual = new MainPage();
        }

        ShowBusy(false);
    }

The problem is that even when the app is installed and running App.Current.InstallState returns NotInstalled and App.Current.IsRunningOutOfBrowser is false - so my control Installed never shows, it always show the Installer control.

This is the case in both my dev and deployed environments.

I'm stumped on this one, anyone have thoughts?

Brent Lamborn
  • 1,370
  • 3
  • 17
  • 37
  • Did you figure it out? I have the same problem in some cases, depending on server config among other (not yet discovered) parameters. – jv42 Feb 15 '12 at 16:18

2 Answers2

0

UPDATE: Red Herring - refer comments

Have the same problem.

I've heard that this only works proper when the application has been code-signed. Don't know if this is true as I cannot test to verify.

This might relate: http://msdn.microsoft.com/en-us/library/dd550721(v=vs.95).aspx

Jaans
  • 4,598
  • 4
  • 39
  • 49
  • Scratch the red-herring above. I've discovered that my `source` parameter for the Silverlight XAP package on the server page includes some dynamic parameters at the end, which for some reason makes Silverlight OOB think that it's a different application every time. If I remove it and have just the plain XAP file specified in the `source` parameter then is works as expected. Nothing to do with Code Signing. – Jaans Jan 11 '13 at 04:26
0

I have seen problems with this when the browser is in private browsing mode.

chrisortman
  • 1,514
  • 15
  • 22