Creating WixSharp Setup in asp.net website.

Oct 26, 2015 at 11:17 AM
Hi ,

I am trying to create setup using wixsharp in my website its works fine when i am running it in visual studio. but when i deploy it on IIS it create the all necessary file for the setup but at the end doesn't create the setup. I am using WixSharp v1.0.27.0 .
Coordinator
Oct 26, 2015 at 11:24 PM
Sorry I am a bit confused. Can you elaborate?

> I am trying to create setup using wixsharp in my website its works fine when i am running it in visual studio.
What exactly works fine? Do you mean 'wixsharp works fine' or 'website works fine'?

> but when i deploy it on IIS it create the all necessary file for the setup but at the end doesn't create the setup.
If you managed to deploy the website it means that you have built the msi setup file and executed it. Is it correct? If it is then what does it mean "doesn't create the setup."

Is it is not correct and "deploy it" means that VS copied the files into IIS app directories then you also need to run the Wix# compiler to build the msi? You can do this by either using the WixSharp Visual Studio project template or manually.

The all aspects of Wix# Visual Studio integration are reflected in the Wiki documentation. And for the code sample you will need to have a look at IIS_ASP_NETApp sample.
Oct 27, 2015 at 7:33 AM
Edited Oct 27, 2015 at 10:14 AM
Hi,

  • Wixsharp Dll works fine and create the setup file (when running in Visual Studio). In my scenario user will select some files through my website or upload them then those files will be packaged into the setup for installation.

  • When i deploy the website into IIS and select some files through my website which will be packaged into setup through wixsharp. the whole process works fine create these files:
    setup.wxs ,
    Pikard.wixobj ,
    Pikard.wixpdb
    necessary for the setup.but in the end don't create the setup file setup.msi.

Note:- I am not intalling website with wixsharp setup. But i am creating setup using wixsharp dll through my website.
Coordinator
Oct 28, 2015 at 12:18 AM
OK, I see.
Then I suggest you have a look at the output that is generated by the Project.BuildMsi() call. It will have the description of the problem you have. It can be a few things. May be some files not found or WiX tools not detected. Without the output log it's almost impossible to troubleshoot it.
Oct 30, 2015 at 11:17 AM
Edited Oct 30, 2015 at 11:20 AM
I have done some changes in IIS Manager in some scenarios it work and in some it don't. i have listed the setting which i have done in IIS Manager .
If in IIS Manager DefaultAppPool Identity is set to LocalSystem then wixsharp code create the setup.msi file successfully without any error. But if DefaultAppPool Identity is set to ApplicationPoolIdentity the wixsharp code create these files:
setup.wxs ,
Pikard.wixobj ,
Pikard.wixpdb
necessary for the setup.but don't create the setup file setup.msi.

Below is link to files which are created when IIS Manager DefaultAppPool Identity is set to ApplicationPoolIdentity.
Setup.wxs
Setup.wixobj
Coordinator
Oct 30, 2015 at 12:46 PM
The fact that the same Wix# build script builds msi under one hosting conditions but not others means most likely your Wix# code is OK. Meaning that it is your hosting is model affects the outcome.

My previous email still stands. What is the Wix# compiler output? The files you shared are irrelevant at this stage. The clue will be in the error reported by Wix# compiler.
Oct 30, 2015 at 1:39 PM
Edited Oct 30, 2015 at 1:41 PM
How i can check the Wix# compiler output? I can't find a property in wix# to create log when it is generating setup.
Coordinator
Oct 31, 2015 at 1:02 AM
There is no property for this. You will need to debug your application and investigate any exceptions thrown. There can be a few exception causes: Wix# specific errors (e.g. WiX compilers are not found) or common applications errors (e.g. concurrency, permissions).

Eix# uses WiX compilers as external processes thus it cannot catch and rethrow any WiX errors. Thus WiX prints its all errors in the Console.StandardOutput. Though Wix# redirects it into debugger output so you will see all the errors.
Nov 4, 2015 at 10:44 AM
Hi,

I have tested with DefaultAppPool Identity is set to ApplicationPoolIdentity of IIS . I am posting the Console Output. The problem is in Light.exe Validation Script.

Question:- Is it Possible to avoid the validation. Is there any property or configuration to disable validation?

Console Output:-
'w3wp.exe' (CLR v4.0.30319: /LM/W3SVC/1/ROOT/ScreenSaverF-1-130909346140359954): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\screensaverf\559dcde5\4b1c325e\assembly\dl3\9b4e9424\2cf362b7_66f8d001\WixSharp.dll'. Cannot find or open the PDB file.
The thread 0x16e8 has exited with code 259 (0x103).
'w3wp.exe' (CLR v4.0.30319: /LM/W3SVC/1/ROOT/ScreenSaverF-1-130909346140359954): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\screensaverf\559dcde5\4b1c325e\assembly\dl3\6fd580ee\00dc5c53_cb12d001\Microsoft.Deployment.WindowsInstaller.dll'. Cannot find or open the PDB file.
A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll
"D:\Development\workspace\abc\WixSharpLibraries\bin\candle.exe" -sw1026 -ext "D:\Development\workspace\abc\WixSharpLibraries\bin\WixUIExtension.dll" "D:\Development\workspace\abc\UserData\30\Setup\SetupFile\setup.wxs" -out "D:\Development\workspace\abc\UserData\30\Setup\SetupFile\setup.wixobj"
Windows Installer XML Toolset Compiler version 3.10.0.2103
Copyright (c) Outercurve Foundation. All rights reserved.

setup.wxs
"D:\Development\workspace\abc\WixSharpLibraries\bin\light.exe" -sw1076 -sw1079 -b "D:\Development\workspace\abc\UserData\30\Setup\SetupFile" "D:\Development\workspace\abc\UserData\30\Setup\SetupFile\setup.wixobj" -out "D:\Development\workspace\abc\UserData\30\Setup\SetupFile\setup.msi" -ext "D:\Development\workspace\abc\WixSharpLibraries\bin\WixUIExtension.dll" -cultures:en-US
Windows Installer XML Toolset Linker version 3.10.0.2103
Copyright (c) Outercurve Foundation. All rights reserved.

light.exe : error LGHT0217 : Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".

light.exe : error LGHT0217 : Error executing ICE action 'ICE02'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".

light.exe : error LGHT0217 : Error executing ICE action 'ICE03'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
light.exe : error LGHT0217 : Error executing ICE action 'ICE04'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
light.exe : error LGHT0217 : Error executing ICE action 'ICE05'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
light.exe : error LGHT0217 : Error executing ICE action 'ICE06'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
light.exe : error LGHT0217 : Error executing ICE action 'ICE07'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wixtoolset.org/documentation/error217/ for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
light.exe : error LGHT0216 : An unexpected Win32 exception with error code 0x643 occurred: Action - 'ICE09' Fatal error during installation
Coordinator
Nov 4, 2015 at 10:20 PM
OK. Great. Now we can completely rule out Wix# from the equation.

The problem you are experiencing is caused by the light.exe not being happy about its runtime conditions. Quick googling immediately reviled a few WiX issue reports of a similar nature: http://wixtoolset.org/issues/4922/ and http://wixtoolset.org/issues/4877/. Unfortunately none of them is processed yet. As I see it the problem is caused by the insufficient privileges of your application process.

You can disable validation with Project.LightOptions however there is a little chance it will help. Probably a better approach is to stick with the AppPool settings that work for you.