2

I have a C# app that we deploy on Win7 machines (using ClickOnce) without any issues (for years now) but we have a few employees with a Surface Pro 2 (8.1) and the app won't install. When they run the setup.exe they get the standard "contact your administrator for details" error. Here's the log that it produces:

    PLATFORM VERSION INFO
    Windows             : 6.2.9200.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.34014
    System.Deployment.dll       : 4.0.30319.33440 built by: FX45W81RTMREL
    clr.dll             : 4.0.30319.34014 built by: FX45W81RTMGDR
    dfdll.dll           : 4.0.30319.33440 built by: FX45W81RTMREL
    dfshim.dll          : 6.3.9600.16384 (winblue_rtm.130821-1623)

SOURCES
    Deployment url          : file://asc-server/public/Programs/Installs/SCS/SCS.application
    Deployment Provider url     : file://asc-server/public/Programs/Installs/SCS/SCS.application
    Application url         : file://asc-server/public/Programs/Installs/SCS/Application%20Files/SCS_3_4_0_9/SCS.exe.manifest

IDENTITIES
    Deployment Identity     : SCS.application, Version=3.4.0.9, Culture=neutral, PublicKeyToken=cc0fb6e85ade2b56, processorArchitecture=x86

APPLICATION SUMMARY
    * Installable application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\asc-server\public\Programs\Installs\SCS\SCS.application resulted in exception. Following failure messages were detected:
        + Specified cast is not valid.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [6/18/2014 8:19:42 AM] : Activation of \\asc-server\public\Programs\Installs\SCS\SCS.application has started.
    * [6/18/2014 8:19:42 AM] : Processing of deployment manifest has successfully completed.
    * [6/18/2014 8:19:42 AM] : Installation of the application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [6/18/2014 8:19:42 AM] System.InvalidCastException
        - Specified cast is not valid.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.DownloadManager.VerifyRequestedPrivilegesSupport(String requestedExecutionLevel)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
            at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

I see that it says "Specified Cast is not Valid" but I'm not too sure why we're getting that error. I've tried the following so far (with no luck):

  1. Changed Target CPU from x86 to Any CPU
  2. Changed signing from sha1RSA to sha256RSA
  3. Ran setup.exe as Administrator
  4. Turned off all UAC
  5. Created a basic windows form (1 form, 1 button) and tried to install, but getting same error.
  6. Latest - I took the .exe from the basic windows form app and ran it on the Surface Pro, which it runs fine, so I'm thinking it must be a setting issue.

At this point I'm thinking it's a setting either with the Surface Pro OR a VS deployment setting that I'm missing.

Any ideas or suggestions are greatly appreciated!

1 Answer 1

0

This was caused because of the Users security settings.

security settings

if you select it as in the picture problem is solved automatically. and you may continue installing.

if you cannot see the picture in the link above;

open Control Panel -> User Account Control Settings

adjust the slider 2nd from top. (Notify me only when the apps try to make changes to my computer (default)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.