Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Not deterministic problem with mage.exe return code 2
 

Not deterministic problem with mage.exe return code 2

Hello everybody,

we're using ClickOnce Deployment in our build process. Sometimes (appr. 1 of 30) the build fails with the message
"External Program Failed: C:\Programme\Microsoft.NET\SDK\v2.0\bin\mage.exe 
(return code was 2)"

We're using NAnt. In other 29 cases the deployment goes without any problems,
and our Windows Forms application can be accessible under the configured URL.

I'm suspecting that there are some problems with IIS which make the mage.exe fail.
Does anyone have an idea what the return code = 2 means?
Utwig  Tuesday, July 10, 2007 2:21 PM

Ok. I've found what it was.


a) The problem is internal WebException in XMLTextReaderImpl. This WebException says "Server unavailable. Error code 503".

b) The problem is reproducible also with mageui.exe. The problem happens when I select New application manifest, select the folder with the client and click Populate => mageui.exe shows me shortly after that a standard Windows error message box with options Debug and Close.

c) The cause of the problem are our license files (for instance, log4net.htm) which are also located in the client folder (we must of course deliver our software with appropriate licenses). File log4net.htm references internally to several other URL addresses which seem to be not always available. And obviously mage tries to connect to them. If I delete the licenses, then everything works properly.

Now the question: Why the heck is mage trying to access these addresses?

Utwig  Thursday, July 12, 2007 9:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Give permissions to Dst folder
• Deployment contents of CAB file from msi setup
• Invalid Command Line Argument
• using checkbox condition to set arguments?
• WSuS Deployment Problem
• registering dll's after installation and unregister before uninstall
• Connection Strings and SQL 2005 Express
• Setup and Deployment project visuals in 2005.
• Having a problem installing a service with Vista?
• Single Setup Project For Client and Server?