I've written an ISAPI extension using Visual Studio 2012 on windows 7 that is a very simple passthrough wildcard extension. When compiled as 32 bit, and with the app pool set to allow 32 bit applications the filter works well. But when I compile as 64 bit (and change the pool to NOT allow 32 bit) I get a 500 error with the code 0x8007007f. 64 bit depends shows all green. There are no errors in the event log. I tried moving the DLL to C:\Windows\System32 but am getting the same error. Any help would be greatly appreciated.
Thanks
Marc
The reason might have been that the 64 bit DLL did not export the functions HttpExtensionProc and GetExtensionVersion, which the error name hints at:
Logfile:
Notification
EXECUTE_REQUEST_HANDLER
ErrorCode
The specified procedure could not be found.
(0x8007007f)
I had missed adding the .def file to the linker options in my project.
Related
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).
I'm having issues with redemption because Outlook 32 bit can be installed on a 64 bit machine. The RedemptionLoader doesn't determined the bit version of Outlook installed on a 64 bit machine. Has anyone run into this before?
The problem is that you can't use 32 bit DLLs in 64 bit processes. But there's a workaround I've found after a long period of search.
It's possible to run the 32 bit Redemption-DLL in a 32 bit DllHost.exe process. Now you're able to access this DllHost.exe*32 by your x64 or AnyCPU application, because THAT is possible.
That sounds complicated but is relatively simple.
First register your Redemption.dll (x86) on the system. I've done it this via:
regsvr32.exe "C:\Program Files (x86)\Redemption\Redemption.dll"
If you start your application without registering the Redemption.dll you'll get an exception like:
COMException: Retrieving the COM class factory for component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} failed due to the following error: 80040154 Klasse nicht registriert (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Once the 32 bit DLL ist registered you need to add some keys and values to your Registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Wow6432Node\AppID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"AppID"="{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\AppID\{29AB7A12-B531-450E-8F7A-EA94C2F3C05F}]
"DllSurrogate"=""
What's now happening when start your application is that the system starts a DllHost process which loads the Redemption.dll in a x86 environment. You will see a dllhost.exe*32 with a COM Surrogate description on task manager, after you've started your x64 application. All accesses to Redemption.dll will now be routed to the DllHost.
Of course you have to add these registry keys only on x64 systems with a x86 Outlook client ;)
Hope this will help some of you :)
RedemptionLoader does not determine Outlook bitness because it won't do you any good: it determines the bitness of the calling process and loads the appropriate version of Redemption (32 vs 64 bit), but that can raise an error if the bitness of your process/Redemption is different from the Outlook bitness. A 32 bit dll cannot be loaded by a 64 bit process.
See http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject for more details.
It is possible to load a 32 bit DLL in a 64 bit PowerShell session. See my answer here for more details.
In short, you can use Start-Job -RunAs32 which loads a 32 Bit PowerShell version
Ok so I have been keeping up with decompressing application pools and adding Pre Conditions to the applicationhost.config file. I am now stumped on server 2012.
Symptom:
Application Pool keeps crashing, even log error kicks off 4 listener channel errors and then kills the the app pool.
Previous Fix for older version servers:
Backup IIS. I add Pre Condtions to exppw and (and in this case)cafe_exppw. Additionally I add it to Kerbauth (In some cases the Pre Condtion was not needed.) Save. ResetIIS. I then run Anilr's script (ref:http://forums.iis.net/t/1149768.aspx) below which does not work. I am no programmer so I am not sure where to find an update version (if there is one) for 2012
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+[name='xpress',doStaticCompression='false',dll='%windir%\system32\inetsrv\suscomp.dll']
Thanks,
Jack
Often a problem with the 64 bit rpcproxy.dll which is loaded by iis by default even when "enable 32 bit applications" is set to true.
Here's a link that explains
http://blogs.technet.com/b/sbs/archive/2011/04/07/how-to-run-a-32bit-web-application-on-sbs-2008.aspx
Could be the source of your problem
Wing
For anyone who might be wondering how I got around this, just add "bitness64" /> to kerbauth and anything exppw in GlobalModules in the web.config file. Reboot IIS, verify OWA still works and that should do it. You might see some kerbauth errors but I am yet to see any real issue stem from it.
For your information there is no need to decompress the app pool:
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']
I'm running windows 7 64-bit and trying to load an ISAPI Extension I'm busy writing on my local IIS7 machine.
I added the location to the DLL under "ISAPI and CGI Restrictions"
I made the application pool recognize 32-bit applications (Extension is written in Delphi)
I made sure "Everyone" has full permissions on the directory/dll
I made sure to "Allow" ISAPI-dll in the "Handler Mappings" section and set it to "Read/Script/Execute" permissions
I still get 404.0 error in IIS7
I have checked that my MIME Mapping's is setup to handle *.dll and I have a perfectly working ISAPI-extension running on a different site on the same machine.
I even took this ISAPI-extension that gives me the 404 and put it in the root of the working website (where the other DLL is) and re-mapped the "ISAPI and CGI Restrictions" to it. Still gives me 404.0, even though I can literally run the other DLL at the same time or directly afterward and it's fine.
Any idea WTF is going on?!
It turns out when you receive a 404.0 file not found error when you've setup everything else to work correctly, it means thats the ISAPI extension you're using is referencing (ie, including) another DLL as well. Without that DLL, it will 404.0
Also, if you've forgotten to "allow" a specific ISAPI DLL (even though ISAPI/CGI is allowed to execute) the error message you'll get is 404.2 :)
I know this one's been answered but since I just ran across this yesterday, I'd also point out that 404.0 is the response you get if the application directory doesn't have Execute permission on it. It's not just for binding errors.
For 64 bit, the problem is the registry: The problem I was for 32 bit the location of apache redirector in registry is: [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
but for 64 bitlocation must be: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
Note the "Wow6432Node".
so just re-create the 32 bit on the Wow6432Node and then you are set.
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.