locked
ClickOnce Fails with 'Value does not fall within the expected range' RRS feed

  • Question

  • I am getting the following error details trying to install a ClickOnce application for the first time.  I can't find anything about System.Deployment.Internal.Isolation.IsolationInterop.GetUserStateManager() listed in the stack trace and what it might be having a problem with.  I have successfully deployed to other machines but this one is causing a problem.  I am wondering if there is additional logging information that I might be able to get to help troubleshoot this.

     

    Any suggestions/help appreciated!

     

    PLATFORM VERSION INFO
     Windows    : 5.2.3790.131072 (Win32NT)
     Common Language Runtime  : 2.0.50727.1433
     System.Deployment.dll   : 2.0.50727.1433 (REDBITS.050727-1400)
     mscorwks.dll    : 2.0.50727.1433 (REDBITS.050727-1400)
     dfdll.dll    : 2.0.50727.1433 (REDBITS.050727-1400)
     dfshim.dll    : 2.0.50727.1433 (REDBITS.050727-1400)

    SOURCES
     Deployment url   : file:///C:/Install/TestProgram.application

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of C:\Install\TestProgram.application resulted in exception. Following failure messages were detected:
      + Value does not fall within the expected range.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [11/20/2008 8:51:27 AM] : Activation of C:\Install\TestProgram.application has started.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [11/20/2008 8:51:27 AM] System.ArgumentException
      - Value does not fall within the expected range.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStateManager(UInt32 Flags, IntPtr hToken, Guid& riid)
       at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
       at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
       at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
       at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.

    Thursday, November 20, 2008 5:52 PM

Answers

  • We finally found out the problem with this ClickOnce install site.  It turns out that the user profile was corrupt in some manner.  We were attempting to install using a domain administrator account on a Win2003 R2 running Terminal Services and getting the errors stated above.  After creating a new account on the server, we were able to successfully install the ClickOnce application.

    Just thought I'd leave a post in case some else runs into this same scenerio.
    • Marked as answer by dougknudsen Tuesday, March 3, 2009 3:51 PM
    Tuesday, March 3, 2009 3:51 PM

All replies

  • This error usually occurs when someone has mucked with the deployment files after deployment. Can you redeploy it and try it again?  I assume you're deploying it with Visual Studio? Is your deployment url c:\whatever? Or are you copying the files to that folder and then trying to install the application?

     

    And are you running on Vista or XP?

     

    RobinS.

    GoldMail.com

     

    Friday, November 21, 2008 5:49 AM
  • Thanks for your suggestions Robin.

     

    I normally do not use VS to deploy this app but use command tools (ie. msbuild and mage) as I have to change the manifests and resign them before deployment (the app is sent to several clients that use a local file system deployment strategy so I need to change the deployment/update path for each client separately).  This has not caused a problem with several deployments we have done so far of this app.  However, as a test, I did try publishing the app out of Visual Studio directly to get a clean deployment and did not mess with the manifests at all.  I still get the same error as before trying to install.  The deployment url is a share on the machine I am install the app on (for example, \\machine\share).

     

    This install is on a Win 2003 server that operates as a terminal server.  I am trying to install the app logged in as a local administrator.  I am not trying to make this app available for terminal server users at this point.  I just want to be able to install and run the app on the server machine when logged in as a local administrator user.

     

    -Doug-

     

    Friday, November 21, 2008 4:42 PM
  • What I'm finding confusing is it says the deployment url is C:\something...

     

    So did you create the publish package and then edit it with mage tochange the deployment url, and copy the publish files there? The example you've posted doesn't seem to be installing from a network share.

     

    RobinS.

    GoldMail.com

     

    Saturday, November 22, 2008 12:25 AM
  • The deployment url is \\servername\sharename when I publish out of VS.  However, since this share is on the server machine that I am trying to install the program on, it is just installed from C:\<share folder path>.  I am not editing this test deployment with mage or any other tools.  Just publishing straight out of VS to a temp folder on the development machine.  And then copying the deployment files to the install machine (in another physical location) and attempting to run the install from its C: drive.

     

    Sunday, November 23, 2008 5:07 PM
  • My guess would be that to ClickOnce, \\servername\sharename looks a lot different than C:\Instal\ does. Just out of curiosity, on the server itself, what if you click on Start/Run and type in \\servername\sharename\setup.exe or \\servername\sharename\yourappname.application ?

     

    The deployment url must match the place from where you are deploying it, and I'm not talking about physically.

     

    If you deploy to http://blahblah.com/whatever , you can change the IP address of blahblah.com and it will still pick up upgrades and install fine. It's the actual URL that matters. This is a security feature of ClickOnce, to make sure that nobody hijacks your deployment.

     

    RobinS.

    GoldMail.com

     

    Sunday, November 23, 2008 10:12 PM
  • We are changing the issue type to “Comment” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!

     

    Thursday, November 27, 2008 1:58 AM
  • Sorry this took a while to answer back.  The system I am having problems with is remote and I was having trouble getting access.

     

    Using \\servername\sharename\yourappname.application still gives me the same results.

     

    Is there anywhere I can get more documentation on this error or what might be happening when this error is thrown or what the UserStateManager is doing?

     

    - Value does not fall within the expected range.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStateManager(UInt32 Flags, IntPtr hToken, Guid& riid)
       at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
       at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType

     

    Thanks for your patience.

    Thursday, December 4, 2008 10:56 PM
  • We finally found out the problem with this ClickOnce install site.  It turns out that the user profile was corrupt in some manner.  We were attempting to install using a domain administrator account on a Win2003 R2 running Terminal Services and getting the errors stated above.  After creating a new account on the server, we were able to successfully install the ClickOnce application.

    Just thought I'd leave a post in case some else runs into this same scenerio.
    • Marked as answer by dougknudsen Tuesday, March 3, 2009 3:51 PM
    Tuesday, March 3, 2009 3:51 PM