From: sdmsmiller on
I have a Managed C++ assembly DLL that when run on Windows Vista works but
when run on Windows Server 2008 x86 does not. It is using
Microsoft.Web.Administration.dll and when calling:

ServerManager^ mgr = gcnew ServerManager();

An exception is thrown BadImageFormatException. I also get the following
error:

Create site failed. Reason: Retrieving the COM class factory for component
with
CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the following
error:
800700c1.

which is Microsoft.ApplicationHost.WritableAdminManager (nativerd.dll).
When debugging, I see this DLL load, unload, and then report this error.

800700c1 states "not a valid Win32 application".

I don't understand how a DLL installed by the OS could report this type of
incompatibility.

Why this works on Vista and not on Win Server 2008 is a real mystery to me.
Does anyone have any clues what the problem could be?
From: Jeffrey Ingalls on
If it is a Vista 64-bit to a Windows 2008 x86 then you'll need to either buid
32bit and 64bit versions of the assembly or force it to always run in 32-bit
mode.

CorFlags Conversion Tool:
http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx

All the best,
Jeffrey Ingalls


"sdmsmiller" wrote:

> I have a Managed C++ assembly DLL that when run on Windows Vista works but
> when run on Windows Server 2008 x86 does not. It is using
> Microsoft.Web.Administration.dll and when calling:
>
> ServerManager^ mgr = gcnew ServerManager();
>
> An exception is thrown BadImageFormatException. I also get the following
> error:
>
> Create site failed. Reason: Retrieving the COM class factory for component
> with
> CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the following
> error:
> 800700c1.
>
> which is Microsoft.ApplicationHost.WritableAdminManager (nativerd.dll).
> When debugging, I see this DLL load, unload, and then report this error.
>
> 800700c1 states "not a valid Win32 application".
>
> I don't understand how a DLL installed by the OS could report this type of
> incompatibility.
>
> Why this works on Vista and not on Win Server 2008 is a real mystery to me.
> Does anyone have any clues what the problem could be?