Troubleshooting the message "Cannot continue. The application is improperly formatted"
Who is this article for?
Users who encounter the error when deploying the desktop client via ClickOnce
IT Administrator permissions are required to resolve the issue.
This article helps you diagnose and resolve the error "Cannot continue. The application is improperly formatted" that occurs during ClickOnce installation of the desktop client.
When This Error Occurs
You'll see this error message during the ClickOnce download process, before the client application launches:
It indicates the ClickOnce installation itself has failed.
Initial Troubleshooting Steps
To identify the specific cause, click the Details button when the error appears. This opens a Notepad window displaying the complete error message, including an ERROR SUMMARY section that contains diagnostic information.
Diagnosis and Solutions
Step 1: Verify the Application URL
Locate the line beginning with "Exception reading manifest from […]" and check the URL that follows.
If the URL points to a different server (such as login.microsoftonline.com instead of your application server), this indicates a connection interruption. For example, if Azure presents a login prompt before the client can reach the application server, ClickOnce cannot proceed and will fail.
Solution: Configure network access so the client computer connects directly to the application server without intermediate authentication steps.
Step 2: Check for Manifest File Issues
If the URL correctly points to vision.application on the application server, examine the error message that appears immediately below.
Error messages indicating file corruption:
- "DTD is prohibited in this XML document"
- "Data at the root level is invalid. Line 1, position 1"
These messages suggest the vision.application file is either corrupted or not being read correctly.
Solution: Verify that vision.application is a valid manifest file by comparing it against a known working backup, or rebuild the ClickOnce package.
Step 3: Resolve Duplicate DLL Errors
If you see the error "Exception from HRESULT: 0x80070C81", this means the ClickOnce package contains duplicate DLL files. This typically happens when the Excel Importer has been added to the client package in a subfolder.
Solution: Ensure the ClickOnce package includes only the application client without any additional Pentana.Tng DLL files.