Repair of application (msi) fails but normal installation is successfull - asp.net

have web setup project created by VS 2010, when i setup this project all works fine, but when i check "repair" option i get error during installation.
MSI log file
Running process 'c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.
Trying 32 bit version of 'aspnet_regiis.exe'...
Reading registry value Path from key 'HKLM\Software\Microsoft\ASP.NET\4.0.30319.0'...
RESULT Path =
Running process 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
I couldnt uderstand why both 32-bit and 64-bit versions of aspnet_regiis not compatible to application?
When i check "setup" not "repair" option, path param is set to my application and setup works fine, so maybe i have to change something in my setup project?
IIS6 is set to 64-bit mode by the way ;)
Thanks

If you support 32 and 64-bit systems you need separate setups for both.
http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx
so you'd run the appropriate aspnet exe for the system, that might solve some problems. You haven't said if your setup is x86 or x64, so it's hard to say what the exact issue might be. 32-bit processes cannot call 64-bit Dlls (and vice versa) so the 32-bit aspnet_regiis.exe can't call 64-bit assemblies in a 64-bit IIS, that's probably something to do with it.
That doesn't look like an MSI log file because it hasn't got all the info in there, like the MSI (s) (74:1C) [12:14:05:000]: type of intro, plust suff that would tell you if the call to the ProgramFiles folder is being redirected (look for WIN64DUALFOLDERS in the log).

Related

windeployqt.exe not working ? Application does not start

I have a simple application using
QT += core gui network webkitwidgets
I've used windeployqt.exe to generate the 32 bits release on my win-10 64 bit computer. When I put the folder on a win-7 64 Bit desktop and double-click the app.exe, it never starts.
I can see it in the task manager, but I can't kill it, and if I try I cannot close the explorer folder in which I double clicked anymore.
I've checked the usual platform, ICU, qwindows.dll, and so on.
http://doc.qt.io/qt-5/windows-deployment.html
EDIT Precisions:
I've compiled with default 32 Bit kit: "build-Test-Desktop_Qt_5_5_1_MinGW_32bit-Release" with "mingw492_32"
I have a package "release" generated by windeployqt.exe using the --webkit switch. I start a command prompt:
> set path=
> set mingw=
Then I make sure that no Qt/Mingw things exists anymore in my environment variables.
I also rename "c:\Qt" into "c:\ __Qt".
I move my release folder on my desktop.
I start release\test.exe ( from the clean path shell )
Everything runs fine! So The release/test.exe has everything it needs without the path/mingw variable.
But as soon as I put the folder on another windows machine ( 7 instead of 10 ) it never starts.
I tried dependency walker. It shows a lot of "API-MS-WIN*.dll" missing...
It even shows much more missing dlls on the "good" machine than on the bad one !!!
Every single "missing dll" on the "bad" target machine is actually in system32 on this machine.
Thanks for advice, every advice is welcome, I'm a bit desperate... :)
Edit
It seems to be related to the machine itself. I have successfully deployed this (very small) app to 2 non developer machine on win7 and win8 respectively. But the above "bad machine" still resits running it...
Edit
The problem seems not to be general but related to this one particular machine. Hence, feel free to close or move to the appropriate forum as it is not related to Qt/windeplyqt. If I figure out a solution, and question is closed, I'll simply add a last edit. Safe Boot and malwarebyte are my next actions.
After a long investigation.
Do not believe dependency walker, it used to be a top notch tool but it is now outdated.
If there is a missing dll, the system will prompt you with "cannot load dll xxx.dll" anyway.
Your best shot in case a soft runs on machine X but not on Machine Y is:
start in safe mode ( run: msconfig --> diagnostic startup )
turn off any antivirus or non microsoft/driver software,
"run as administrator".
If you can run with step 3. Then proceed by elimination:
run without admin rights,
Start anti spyware, etc...
Add appropriate exception to your antivirus if it is the root cause.
If the antivirus is not the root cause, run process monitor on both machines. Then compare, what Failed on one machine and not the other ? Read the windows event log and compare any error messages on both machines.
run sfc /scannow to check disk
run a complete anti spyware scan/ pc-repair tool ( malwarebytes, combofix, ... )
Make sure you really have the very same package on both machines, make sure you are not trying to run an exe on mac OS, make sure your computer is on.
Call the oracle, you are in the matrix...
In my case the problem was Avast and it was solved by adding appropriate exception.

In Advanced Installer, how to detect a 32bit process within 64bit machine?

In Advanced Installer, how can I know if a 32bit process is running within a 64bit machine? I need to know this in order to prevent final users to install our application in given scenarios. Our approach is to use custom actions to detect if a given process is running, but it seems that Advanced installer isn't able to recognizes the ".exe *32" in the string end. Does someone know how to proceed in this situation?
This is not the correct approach. To stop users from installing the application on 64 bit machines you need to go to Launch Conditions page and uncheck all the 64-bit OS-es from the list. This will make your package to stop from installing on 64-bit machines.
Of course, for clients running a 64-bit OS you need to create a new setup package, that contains the 64-bit version of your application. For this package set the package type 64-bit AMD from Install Parameters page. Also, in Launch Conditions page make sure you uncheck all the 32-bit OS-es.
If you're really using a custom action to detect a particular 32-bit process, it's nothing to do with Advanced Installer. Your code enumerates the processes to find the one you want, does an OpenProcess() to get a handle and then calls IsWoW64Process, and closes the handle. If you have an x64 MSI file it won't install on a 32-bit system anyway, so I'm assuming that you are trying to prevent your x64 MSI file from installing on a 64-bit system if a certain 32-bit process is running.

memory limit for x64 process in IIS7.5

Windows Web Server 2008 R2 (x64) &
.Net Framework 4.5
It is a classic ASP.Net Web Site (Not a web project, code is in App_Code directory and compiled when the site is being launched)
And it depends on many reference DLLs in /Bin directory.
For those DLLs I have source code, I compile them targeted as "x64" platform.
And I have some other DLLs without source code (mysql.data.dll / etc), which are compiled as "Any CPU".
I modified them in EditBin.exe to ensure the IMAGE_FILE_LARGE_ADDRESS_AWARE flag is indicated in their PE header.
According to this table:
http://msdn.microsoft.com/en-us/library/aa366778%28VS.85%29.aspx#memory_limits
x64 process can't use more than 2GB memory unless IMAGE_FILE_LARGE_ADDRESS_AWARE is set.
How can I verify whether it works?
Is there any place I can see the memory limitation of running x64 process?
I don't know if you can actually "see the memory limitation" explicitly stated (assuming you don't trust MS's own documentation that you cited) other than getting your hands on and digging into the IIS and/or ASP.NET source code.
That being said, you could try stress testing the site, and monitor memory consumption (via Task Manager or Process Monitor), to see if it exceeds 2GB. I would recommend tinyget, part of the IIS 6 Resource Kit, which can still be used with IIS 7.
tinyget -svr:localhost -uri:/<your site> -loop:200 -threads:20
You'll have to play with the loop and thread count to try to push it over 2GB. I would expect to see an System.OutOfMemoryException as you approach about 1.4GB of combined physical and virtual private bytes. You may want to create a stress test function in the site itself, for testing purposes only of course, which will help you reach this limit, by using the exact opposite of good practices. You can read more about what would lead to an System.OutOfMemoryException` here, and then do things they recommend against. For example, add a test method that just concatenates strings in a very large loop.
try procexp, from sysinternals here. This application can monitor .NET specific metrics.
Nevertheless, according to your link, you should be able to address at least 8GB.
Please keep in mind that enforcing the IMAGE_FILE_LARGE_ADDRESS_AWARE is irrelevant in your case. You could have all your components compiled to target "Any CPU", the only flag that is checked is the flag of the executable file.

I would like to know is there a 64 bit version of advapi32.dll?

I have application on windows server 2008 which gets request for connection via web. The connection is made through registry key. I get this error "The description for Event ID 9300 from source CUSTOMPROJECT Security 3335 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
ActiveX component can't create object
the message resource is present but the message is not found in the string/message table"
I would like to know is there a 64 bit version of advapi32.dll ?
On a 32-bit computer, all 32-bit programs store their files in C:\Program Files, and the system-wide library location is C:\System32.
On a 64-bit computer, 64-bit programs store their files in C:\Program Files, and the system-wide C:\Windows\System32 folder contains 64-bit libraries. 32-bit programs store their files in C:\Program Files (x86), and the system-wide folder is C:\Windows\SysWOW64.
The “WOW64” part of the name here refers to Microsoft’s “Windows 32-bit on Windows 64-bit” software, which is a part of the operating system. This allows Windows to run 32-bit programs on a 64-bit version of Windows. WoW64 redirects file access to ensure programs will work properly.
Here is a good article explaining it.
A quick google for advapi64.dll returns a fair number of results.
I also found this link:
http://social.msdn.microsoft.com/Forums/sk/netfx64bit/thread/410374d5-139a-47f9-9d5b-3851247f4024
Which indicates you should look for the 64-bit version of the file here:
%WinDir%\System32

Could not load assembly 64bit machine

I am getting the following error if I try to run the ASP.NET 4.0 website in a 64 bit machine with Enable 32 bit Applications flag set to false. (I have to set that to False, If I set it to true its working fine).
> "Could not load file or assembly 'Common.BL' or one of its dependencies. An attempt was made to load a program with an incorrect format.
And in the project properties the Target of Build is set to Any CPU.
Still I am getting the same error.
Can you guys please help me resolving this error. Anyhelp would be appreciated.
Thanks.
Sameer.
I'd focus on the "or one of its dependencies" portion of the error. Are you referencing a 32-bit assembly or one compiled for a different platform?
Ensure Common.BL is 64 bit. You can check this fairly easily. Check this out for help:
How to determine if a .NET assembly was built for x86 or x64?
Let's use that as a starting point, post the results. If it is a 32 bit and you are on IIS 6, then ALL of IIS must be set to run in 32 bit mode.
If you are in IIS 7 then you can set a specific app pool to run in 32 bit mode. Ensure you compile your code for 32 bit though.

Resources