ISAPI Filter not working on Windows 2008 R2 64-bit - filter

I have developed an ISAPI filter which runs fine on 32-bit. I also compiled it for 64-bit using VS2005 cross-compiler. But when I am trying to run it on Windows 2008 R2 64-bit server with IIS-7.5, it does not work. It seems filter dll has been loaded but IIS is not doing anything with it. I used the following command to check this.
tasklist /m mydll*
Any suggestions what

Is there a particular reason you need the DLL to be 64 bit? I've been able to run 32 bit ISAPI filters on a 64 bit machine by doing the following:
Make sure the IIS application pool is set to allow 32 bit applications (this is off by default)
Register the DLL using the 32 bit version of regsvr32: C:\Windows\SysWow64\regsvr32.exe
Verify that the DLL isn't missing any dependencies by using Dependency Walker: http://www.dependencywalker.com/

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.

Related

Registering 32 and 64 bit DLL in a single MSI using WiX

I need to create a SINGLE Windows installer that performs the following tasks when it is run on the target m/c:
Runs a service
Registers a 32 bit DLL
Stores the 32 bit and 64 bit log4cxx.dll libraries in C:\Windows\sysWoW64 folder and C:\Windows\system32
Registers a 64 bit DLL
Currently, I am using WiX to create an installer and I am at a point where I can register either 32 bit OR 64 bit installer but not both. Unfortunately, I don't have the option of separating the 32 and 64 bit installer as I need to register both the installers on a 64 bit machine.
I would like to know if there was a way to register both the DLLs in one installer. Thanks in advance.
WiX doesn't support mixed 32/64-bit packages. So the only option is using separate packages:
A 32-bit package for 32-bit systems.
A 64-bit package which installs both 32-bit and 64-bit resources on a 64-bit machine.
Another solution is to use a different setup authoring tool which supports mixed 32/64-bit packages. Perhaps this list will help: http://en.wikipedia.org/wiki/List_of_installation_software

Including sql server compact in desktop install for win 7 32bit and 64bit

I have a desktop app created in vs10 and am using clickonce install. I must include a database with critical info for the program as part of the install. I am compiling for all versions of windows (32 and 64). But as I understand it, if I include the 32 bit sqlce as part of the installation, it will not work on 64 bit installs. Must I include a 32 bit and 64 bit version of the db and test for windows version before accessing the data? Or is there a simpler solution that I am missing?
You can just include all the required files as content with your app, and it will run for any user and on both x86 and x64 platforms. Just follow the instructions here: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

Visual FoxPro driver for 64 bit Windows 7

I've installed Visual FoxPro driver from this link on my 64 Bit Windows 7 Home Premium OS and tried to register vfpoledb.dll using REGSVR32. I could able to register this dll but when run my application which accesses VFP database is throwing the following error:
System.InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on the local machine.
The same application is working fine in 32 bit Windows 7 Home Premium OS without any issues. I have googled for 64 bit VFP driver and found out that there are no VFP drivers for 64 bit OS from this link. Kindly help me to resolve this issue.
I have found out that there is no 64 bit VFP Driver for 64 bit OS. All we have to do is to change the build option in project properties and set the Platform Target to X86 instead of Any CPU. Build the application for X86. Please refer to this for more details.
It's a bit late, but may help somebody else:) You can use Advantage OLE DB Provider for Windows 64-bit, which works like VFPOLEDB. Example in python:
conn = win32com.client.Dispatch('ADODB.Connection')
dsn = 'Provider=Advantage OLE DB Provider;Data Source=%s; ServerType=ADS_LOCAL_SERVER; TableType=ADS_VFP;' % folder
conn.Open(dsn)
cmd.CommandText = 'ALTER TABLE test ALTER COLUMN area NOT NULL'
cmd.Execute()
A blog post by Eric Selje, of Salty Dog Solutions, describes how to run the 32-bit drivers on 64-bit Windows. (You must set them up in the 32-bit ODBC Administrator.)
Visual FoxPro, a 32-bit application, runs just fine on 64-bit machines.
Visual FoxPro cannot use 64-bit ODBC drivers however.
You can use 32-bit ODBC drivers on 64-bit Windows, but you must set them up in the 32-bit ODBC Administrator. This is not the one that’s
going to come up if you go through Control Panel. To invoke it, run
C:\Windows\SysWow64\odbcad32.exe and add your DSNs there.
Do not just Start, Run, ODBCAd32.exe, as it will not bring up the right one.
The 32-bit drivers for SQL Server come with Windows 7 x64, so you don’t have to download them.

How to create an installer condition that test for 32 and 64 bit Windows

I am creating a visual studio set-up project. I need to test to see if the version of Windows I am being installed on is 64 or 32 bit. I am planning on checking for the existence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node as a way of telling that I am being installed on 64 bit windows. Is this a good idea and/or is there a better way?
The reason that I want to know which version of Windows I am on is so I can create a directory under either System32 or SysWOW64. I would rather not create two installers one targeting 64 bit platforms and one targeting 32 bit platforms.
The easiest way to check for a 64 bit machine in an MSI installer is to use the VersionNT64 property. This will only be set if the target machine is running a 64 bit operating system.
http://msdn.microsoft.com/en-us/library/aa372497(VS.85).aspx

System.Data.OracleClient on Windows 7 64

I'm trying to access an Oracle Database from a program I'm writing on Windows 7 64bit. Whenever it initializes the client, i get a BadImageFormatException complaining that I'm trying to use a 32bit client in a 64bit environment. I've tried to compile the program in any way (Any CPU, 32, 64 bit), but it did not solve the problem. Any help?
I would guess that the error message is correct. You have a 32 bit Oracle DLL that you use from a 64 process. The Oracle DLL probably does some interop's with native code, that may require it to be processor specific.
There are several ways to solve this.
Option 1: Get the 64 bit Oracle DLLs.
Option 2: Make sure that your process is 32 bit.
.NET exe files marked for AnyCPU will start a 64 bit process on a 64 bit operating system. But if you mark your EXE file for x86 then it should work. For Web applications you have to set a 32 bit flag somewhere in IIS.
You need to configure your Project to target the .NET 4 Framework, by going to Project-Designer -> Target Framework.
Then you need to delete the old Oracle dll, and use the new 64-Bit-Version of the Oracle dll that is included in the .NET 4 Framework.

Resources