none
Clickonce deployment failed - System.Security.XmlSyntaxException

    Question

  • Hi,

    We have a ClickOnce deployed application, which is working for some users.

    One user is getting the "Application cannot be started. Contact the application vendor" error. The error details are:


    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.
    
    WARNINGS
     There were no warnings during this operation.
    
    OPERATION PROGRESS STATUS
     * [1/11/2010 10:32:38] : Activation of http://xyz.com/xyz.application has started.
    
    ERROR DETAILS
     Following errors were detected during this operation.
     * [1/11/2010 10:32:38] System.Security.XmlSyntaxException
     - Invalid syntax on line 1.
     - Source: mscorlib
     - Stack trace:
     at System.Security.Util.Parser.GetRequiredSizes(TokenizerStream stream, Int32& index)
     at System.Security.Util.Parser.ParseContents()
     at System.Security.Util.Parser..ctor(Tokenizer t)
     at System.Security.SecurityElement.FromString(String xml)
     at System.Security.Policy.PolicyLevel.AppendRegistryInfoToNamedPermissionSet(SecurityElement securityElement, Int32 namedPermissionSetIndex)
     at System.Security.Policy.PolicyLevel.GetInternetElement()
     at System.Security.Policy.PolicyLevel.SetFactoryPermissionSets()
     at System.Security.Policy.PolicyLevel.SetDefault()
     at System.Security.Policy.PolicyLevel.LoadPolicyLevel()
     at System.Security.Policy.PolicyLevel.CheckLoaded()
     at System.Security.Policy.PolicyLevel.Resolve(Evidence evidence, Int32 count, Char[] serializedEvidence)
     at System.Security.PolicyManager.CodeGroupResolve(Evidence evidence, Boolean systemPolicy)
     at System.Security.PolicyManager.ResolveHelper(Evidence evidence)
     at System.Security.HostSecurityManager.ResolvePolicy(Evidence evidence)
     at System.Security.PolicyManager.Resolve(Evidence evidence)
     at System.Security.SecurityManager.ResolvePolicy(Evidence evidence)
     at System.Xml.XmlSecureResolver..ctor(XmlResolver resolver, String securityUrl)
     at System.Security.Cryptography.Xml.SignedXml.GetC14NDigest(HashAlgorithm hash)
     at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
     at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
     at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
     at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
     at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
     at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
     at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
     at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
     at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
    
    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available
    

    Does anyone know what is going wrong (I am utterly stumped), or even better, how you would fix this issue?

    Thanks,

    knalgan1

    • Edited by knalgan1 Saturday, November 06, 2010 4:00 PM tidy formatting
    Saturday, November 06, 2010 3:58 PM

Answers

  • We had to re-install .NET Framework on client machine to resolve this issue
    • Marked as answer by knalgan1 Wednesday, November 10, 2010 2:45 PM
    Wednesday, November 10, 2010 1:54 PM

All replies

  • Hi,

     

    ->XmlSyntaxException

     

    The exception that is thrown when there is a syntax error in XML parsing. (Check this link: http://msdn.microsoft.com/en-us/library/system.security.xmlsyntaxexception.aspx )

     

    Best regards,

    Ling Wang


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, November 10, 2010 10:13 AM
  • We had to re-install .NET Framework on client machine to resolve this issue
    • Marked as answer by knalgan1 Wednesday, November 10, 2010 2:45 PM
    Wednesday, November 10, 2010 1:54 PM
  • Thanks for sharing your answer. It will be very beneficial for other community members having the similar questions.

    Have a nice day. J


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, November 11, 2010 2:37 AM
  • I had this error in a different context and was able to resolve it by deleting the .cch files from the roaming user profile.

    You will find them here on Windows 7

    c:\users\USERNAME\AppData\Roaming\Microsoft\CLR Security Config\v2.0.50727.312\

    Basically delete anything called security.config.cch or security.config.cch.####.######## (where # represents a digit).

    It seems to be some sort of precompiled version of security.config, and is recreated on next run.

    For reference, I diagnosed it by using Process Monitor to see what files were accessed. These were accessed just before it quit.


    • Edited by Benhaha Wednesday, March 28, 2012 2:01 PM
    • Proposed as answer by Benhaha Wednesday, March 28, 2012 2:01 PM
    Wednesday, March 28, 2012 2:00 PM