none
ClickOnce Deploy problem: System.Deployment.Application.InvalidDeploymentException RRS feed

  • Question

  • I'm trying to debug a ClickOnce deployment problem.  Here's the scenario:  I have 4 projects being built by an automated server.  All 4 publish their app on the same server.  3 out of the 4 apps install properly through ClickOnce.  The 4th one does not.  I spent the last few days trying to figure out what is different with the 4th project and compared everything from the CSPROJ file to the SLN file to the directory properties, IIS setup properties, etc. and nothing is jumping out at me.  I tried to follow the instructions to setup logging (http://msdn.microsoft.com/en-us/library/ms404265.aspx) but that doesn't work.  Has anyone made it work?  I'm using "C:\logs" as my log path.

    Here's the output when I click on Install:

    PLATFORM VERSION INFO

    Windows : 5.1.2600.196608 (Win32NT)

    Common Language Runtime : 4.0.30319.1

    System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)

    clr.dll : 4.0.30319.1 (RTMRel.030319-0100)

    dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)

    dfshim.dll : 4.0.31106.0 (Main.031106-0000)

     

    SOURCES

    Deployment url : http://10.16.30.119/baseline_10/Baseline.application

    Server : Microsoft-IIS/6.0

    X-Powered-By : ASP.NET

    Deployment Provider url : http://10.16.30.119/baseline_10/Baseline.application

     

    IDENTITIES

    Deployment Identity : Baseline.application, Version=10.0.0.6723, Culture=neutral, PublicKeyToken=0000000000000000, 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 http://10.16.30.119/baseline_10/Baseline.application resulted in exception. Following failure messages were detected:

    + Exception reading manifest from http://10.16.30.119/baseline_10/Application%20Files/Baseline_10_0_0_6723/Baseline.exe.manifest: the manifest may not be valid or the file could not be opened.

    + Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: 

    -HRESULT: 0x80070c81

    Start line: 0

    Start column: 0

    Host file:

    + Exception from HRESULT: 0x80070C81

     

    COMPONENT STORE TRANSACTION FAILURE SUMMARY

    No transaction error was detected.

     

    WARNINGS

    * The manifest for this application does not have a signature. Signature validation will be ignored.

     

    OPERATION PROGRESS STATUS

    * [3/30/2011 7:12:35 PM] : Activation of http://10.16.30.119/baseline_10/Baseline.application has started.

    * [3/30/2011 7:12:35 PM] : Processing of deployment manifest has successfully completed.

    * [3/30/2011 7:12:35 PM] : Installation of the application has started.

     

    ERROR DETAILS

    Following errors were detected during this operation.

    * [3/30/2011 7:12:39 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)

    - Exception reading manifest from http://10.16.30.119/baseline_10/Application%20Files/Baseline_10_0_0_6723/Baseline.exe.manifest: the manifest may not be valid or the file could not be opened.

    - Source: System.Deployment

    - Stack trace:

    at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)

    at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, 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)

    --- Inner Exception ---

    System.Deployment.Application.InvalidDeploymentException (ManifestParse)

    - Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: 

    -HRESULT: 0x80070c81

    Start line: 0

    Start column: 0

    Host file:

    - Source: System.Deployment

    - Stack trace:

    at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

    at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)

    at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)

    --- Inner Exception ---

    System.Runtime.InteropServices.COMException

    - Exception from HRESULT: 0x80070C81

    - Source: System.Deployment

    - Stack trace:

    at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)

    at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

     

    COMPONENT STORE TRANSACTION DETAILS

    No transaction information is available.

     

    DETAILED EXECUTION FLOW

    [19:12:35] : Activation through dfsvc.exe started.

    [19:12:35] : Method Call : ActivateDeploymentWorker(http://10.16.30.119/baseline_10/Baseline.application,False,,,System.Deployment.Application.ApplicationActivator+BrowserSettings) called.

    [19:12:35] : Method Call : PerformDeploymentActivation called.

    [19:12:35] : Activating through deployment manifest.

    [19:12:35] : Start processing deployment manifest.

    [19:12:35] : Method Call : DownloadDeploymentManifestBypass called.

    [19:12:35] : Method Call : DownloadDeploymentManifestDirectBypass called.

    [19:12:35] : Method Call : DownloadManifestAsRawFile called.

    [19:12:35] : Method Call : DownloadSingleFile called

    [19:12:35] : DownloadQueueItem :  _sourceUri = http://10.16.30.119/baseline_10/Baseline.application,  _targetPath = C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\75YJK3G6.7Y5\6J22E9Z5.RO8.application

    [19:12:35] : HttpWebRequest= Proxy.IsByPassed=True, ProxyUri=http://10.16.30.119/baseline_10/Baseline.application

    [19:12:35] : HttpWebResponse=ResponseUri=http://10.16.30.119/baseline_10/Baseline.application

    [19:12:35] : Method Call : ManifestReader.FromDocumentNoValidation(C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\75YJK3G6.7Y5\6J22E9Z5.RO8.application) called.

    [19:12:35] : expectedAppId=http://10.16.30.119/baseline_10/Baseline.application#Baseline.application, Version=10.0.0.6723, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=x86/Baseline.exe, Version=10.0.0.6723, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=x86, type=win32

    [19:12:35] : Reparse the deployment manifest for validations.

    [19:12:35] : Method Call : ManifestReader.FromDocument(C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\75YJK3G6.7Y5\6J22E9Z5.RO8.application) called.

    [19:12:35] : Schema validation passed.

    [19:12:35] : Manifest is parsed successfully.

    [19:12:35] : Semantic validation passed.

    [19:12:35] : Manifest is unsigned.

    [19:12:35] : Signature validation passed.

    [19:12:35] : Method Call : FollowDeploymentProviderUri called.

    [19:12:35] : Deployment manifest zone is not local machine. Zone = Internet

    [19:12:35] : providerUri=http://10.16.30.119/baseline_10/Baseline.application,sourceUri=http://10.16.30.119/baseline_10/Baseline.application

    [19:12:35] : Deployment provider not followed.

    [19:12:35] : Method Call : BrowserSettings.Validate(C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\75YJK3G6.7Y5\6J22E9Z5.RO8.application) called.

    [19:12:35] : Method Call : AnalyzeManifestCertificate called.

    [19:12:35] : Exception thrown : System.Security.Cryptography.CryptographicException:No signature was present in the subject.

     

    [19:12:35] : Certificate Status=UnknownCertificateStatus

    [19:12:35] : Browser settings allow activation. ManagedSignedFlag=URLPOLICY_ALLOW,ManagedUnSignedFlag=URLPOLICY_ALLOW

    [19:12:35] : Processing of deployment manifest has successfully completed.

    [19:12:35] : Could not find application in store. Continue with downloading application manifest.

    [19:12:35] : Method Call : InstallApplication called.

    [19:12:35] : Method Call : DownloadApplication called.

    [19:12:35] : Start processing application manifest.

    [19:12:35] : Method Call : DownloadApplicationManifest called.

    [19:12:35] : Method Call : DownloadManifest called.

    [19:12:35] : Method Call : DownloadManifestAsRawFile called.

    [19:12:35] : Method Call : DownloadSingleFile called

    [19:12:35] : DownloadQueueItem :  _sourceUri = http://10.16.30.119/baseline_10/Application Files/Baseline_10_0_0_6723/Baseline.exe.manifest,  _targetPath = C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\H5H9VMRD.WNM\9E9OP8W8.LMK\Baseline.exe.manifest

    [19:12:35] : HttpWebRequest= Proxy.IsByPassed=True, ProxyUri=http://10.16.30.119/baseline_10/Application Files/Baseline_10_0_0_6723/Baseline.exe.manifest

    [19:12:39] : HttpWebResponse=ResponseUri=http://10.16.30.119/baseline_10/Application Files/Baseline_10_0_0_6723/Baseline.exe.manifest

    [19:12:39] : Method Call : ManifestReader.FromDocument(C:\Documents and Settings\hhung\Local Settings\Temp\Deployment\H5H9VMRD.WNM\9E9OP8W8.LMK\Baseline.exe.manifest) called.

    [19:12:39] : Schema validation passed.

     

    • Moved by Larcolais Gong Friday, April 1, 2011 6:01 AM (From:Visual C# General)
    Thursday, March 31, 2011 7:33 PM

All replies

  • Hi

    i see this - Exception reading manifest from http://10.16.30.119/baseline_10/Application%20Files/Baseline_10_0_0_6723/Baseline.exe.manifest: the manifest may not be valid or the file could not be opened.

    you could try to deploy the app  through VS to another site on iis , and check if the app deploy on any client whitout problems.


    Live like you'll die tomorrow, learn like you'll live forever. Blog
    Thursday, March 31, 2011 8:06 PM
  • I will help you moving your thread into appropriate forum.

    Best Regards,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, April 1, 2011 6:01 AM
  • Greg,

    I saw that line too and I can download the manifest with no problems if I enter that URL into IE.  The second to the last line in the log shows where ClickOnce downloaded the file to, but when I go there, it's not there.  So, I'm guessing that's why the Inner Exception is saying that the Parsing error happened at Start Line/Column 0/0 since the file is missing.  I tried to monitor the directory to see if the file shows up during the install, but either it comes and goes too fast for me to see or the file just doesn't get downloaded at all.

    Thanks for that suggestion.  After many stops and starts, I was able to have VS deploy to another site on the same box.  And it is working again.  However, every now and then, it will fail and I have to redeploy.  It's getting really annoying.  Does anyone have a clue as to why this error keeps popping up?  I've search the web and I don't see any answers.  I've tried all of Microsoft's suggestions on their Click Once deploy troubleshooting guide and none of it works.

    Thanks.

    Han

    Friday, April 1, 2011 1:22 PM
  • So much for a good thing.  Didn't last long.  The next build broke it again.  Any other suggestions?

    Thanks.

    Han

    Friday, April 1, 2011 3:21 PM
  • Hi drj72,

    Since I cannot repro the same issue in my computer system, so I just looked for some discussions which talked about the same error message, I think you will get some valuable help from the replies, and maybe your root cause is what they have mentioned.

    http://www.windowsdevelop.com/clickonce-setup--deployment-projects/parsing-dom-creation-of-the-manifest-resulted-in-error-17656.shtml

    It seems that you need to deal with the cyclic dependencies issue, or try to publish this application on another computer.

     

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/19ed71bd-a885-4133-9c83-8e2a87bd2684

    http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/73f8ec4f-fbcc-4b81-af59-6d912a09dd38/

    Maybe you have modified the manifest file after you it created by visual studio. And is the manifest upgrade from a old version?

     

    http://compositewpf.codeplex.com/discussions/68847?ProjectName=compositewpf

    The issue was caused by duplicate assemblies. Removing those assemblies will resolve the problem.

     

    For more detail and opinions, you will need to open the link, and the following discussion also can give your some opinions:

    http://social.msdn.microsoft.com/Forums/en-NZ/winformssetup/thread/6430e23c-f389-4cb0-bc12-0bac550d0642

    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b5c0e9ab-3418-4213-83e0-c60b1e862a22

    http://social.msdn.microsoft.com/Forums/en-CA/winformssetup/thread/65837151-4827-4f2d-a228-050ba2bddab9

    http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/ed2ac708-153a-469e-bf5a-8c181760d457/

    http://weblogs.asp.net/marianor/archive/2007/10/09/build-a-clickonce-deploy-with-visual-studio-and-assemblies-not-referenced.aspx

     

    If there's any concern, please feel free to let me know.

    Have a nice day!


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 6, 2011 6:29 AM
    Moderator
  • Hi Mike,

    Thanks for all the links.  I checked them and some seem promising.  However, in the meantime I have gotten my builds to publish.  I took Greg's suggestion earlier to publish to a new directory and copied it to the actual publish directory that the website points to.  This seems to work, but it's a round-a-bout way to do it.  It seems like if I publish on top of another build, it breaks.  But if I publish to a brand new directory, everything works.  And I can copy it to other places and it will still work.  Doesn't make sense to me, but that's how I have my system working now.

    Thanks to all for your suggestions.

    Han

    Wednesday, April 6, 2011 2:41 PM
  • Hi drj72,

    --> But if I publish to a brand new directory, everything works.

    It seems that the old directory configuration has something incorrect for this publish application.

    But I'm not the expert to config the virtual directory.

    I think if this method can solve your question, then you just can use it, since it's hard for us to help you to find the configuration problem.

    And I found several articles, maybe can give you some help:

    Server and Client Configuration Issues in ClickOnce Deployments

    ClickOnce - Quick steps to Deploy, Install and Update Windows Based Client Applications

    HOW TO Enable ClickOnce Compression on IIS

    ClickOnce Deployment using IIS / Apache Server

     

    If you have any concern, please feel free to let me know.

    Have a nice day!


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 7, 2011 5:41 AM
    Moderator
  • Hi drj72,

    Can you try turning off anti-virus software and see if it makes any difference? Especially if you are using Kaspersky, which seems to *hate* ClickOnce deployment. It sounds like it thinks your manifest is corrupted.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Monday, April 11, 2011 6:43 AM
    Moderator
  • Hi RobinDotNet,

    I'm running MS Security Essentials.  I'm not sure that the problem is on the client side.  I think it's on the server/publishing side.  When I publish to a brand new directory, the application installs.  But if I do another build and publish to the same directory, it breaks.  The solution that I came up with was to publish to a new directory for every build.  It's working so far, but I'm still curious as to why publishing on top of a working build breaks it.  My other projects that build on the same server works just fine.  It's just this one project that doesn't work right.

    Thanks.

    Han

    Monday, April 11, 2011 2:33 PM
  • How are you publishing your application to your server? Are you using http or FTP? Does the structure look right?

    Basically, the top folder should have the deployment manifest (.application), setup.exe, and publish.htm if you selected it in VS. It should also have a folder called "Application Files".

    The Application Files folder should have a bunch of folders under it -- one for each version -- like yourapp_1_0_0_0, yourapp_1_1_0_0, etc., where the four numbers match the version your are publishing.

    Under each versioned folder, it should have all of the files for your deployment, including the application manifest (yourapp.exe.manifest).

    When you publish a new version, it should replace the files in the top level, and add a new versioned folder and put the files in it.  (I'm assuming you know that you have to increment the version number each time you publish).

    Is this what you see happening?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Tuesday, April 12, 2011 2:12 AM
    Moderator
  • The build server is also the publish server.  So everything is "in-house".  The publish directory is opened to everyone via IIS.  When I set it up, I right clicked on it and selected "Web Share" and other than changing the name, just used the defaults.

    Everything in the publish directory is as you described.  And yes, I am incrementing the version numbers as I go along. 

    That's the really strange thing.  Once I have a working ClickOnce install, I can copy that whole directory anywhere and it will still install properly.  It only breaks if I publish on top of a working install.  When that happens, I get the error message which I included in my first post above.  I can enter the URL of the .application file and .manifest file in IE and it downloads just fine.  I can open those files in VS2010 and everything looks good.

    This is what I've done to make this all work.  It's not ideal, but it works.  I have a virtual directory in IIS.  I publish to a brand new directory every build, then copy that directory to the virtual directory and to an archive folder.  I have a script that does all this and also changes the DeploymentProvider XML element to point to the correct place once the files are copied.  And everything works.

    What does the error message in my original post mean? Why does publishing on top of a working install break it?  My other projects work just fine that way.  It's only this project that I need to perform some fancy footwork to get it working right.

    Thanks for helping me here.

    Han

    Tuesday, April 12, 2011 2:09 PM
  • Hi drj72,

    Have you tried the suggestions from my post?

    Would you like to let me know the result after you tried those suggestions?

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 14, 2011 6:05 PM
    Moderator
  • Hi drj72,
    I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?
    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 18, 2011 1:11 PM
    Moderator
  • Hi Mike,

    Ever since I have the build working, I've been diverted to other projects.  Even though the build isn't exactly how it should be, it is working.  Maybe when I have more time in the future, I can investigate further.

    Thanks for all your help.

    Han

    Monday, April 25, 2011 7:21 PM
  • Hi drj72,

    Any way, I'm glad to hear that it is working now, though the root cause has not been found.

    And thanks for your update.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 26, 2011 1:17 PM
    Moderator
  • i had the same problem, i checked the -rigth click in the solutions, properties, publish,-applications files- button-   and i noted that the same application was added two times so i excluded one and everything work ok.

    Thursday, December 19, 2013 8:51 PM