At 11:22 PM 12/8/2004, Tonko Juricic wrote:
>I am running Apache 2.0.52 on Windows Server 2003 with
>.NET Framework v1.2.30703.

Hmmm.  Have tested 1.0 and 1.1 frameworks fairly thoroughly...

but...

>After installing mod_aspdotnet v2.0.0 with MSI
>installer and starting .NET application I was getting
>this error:
>
>mod_aspdotnet: Failed to create ASP.NET Request, 
>...
>HandleRequest: Failed with unexpected Exception;
>System.TypeLoadException: Could not load type
>'Apache.Native.apr_table_t' from assembly 'Apache.Web,
>Version=2.0.0.2000, ...

Interesting.  Perhaps we need to add some more diagnostics
to our error emit code, to really wash out the entire error
chain to the log.

What is interesting here - it's successfully loaded the
CLR, the Apache.HostFactory, and got all the way into
processing requests.

>This prompted me to download the source code and
>compile it with VS.NET 2003. The problem remained and
>now I tried to cheat by copying struct apr_table_t
>definition from apr_tables_c into Apache.Web.h. 

We have heard of this error - I don't find it in my
original VS.NET, but 2003 users have noted it, and
I understand the next VS.NET will entirely break all
our C++ code due to the way they have refactored the
C++.NET semantics.

Someone with 2003 is going to have to take a closer
look at this, till I can get .NET 2003 up on yet
another box.

>That apparently worked but I got the same error for
>another internal structure: System.TypeLoadException:
>Could not load type 'Apache.Native.apr_bucket_alloc_t'
>
>And so on ... practically all structures defined in
>Apache C files would need to be included.

Can I suggest something?  Try uninstalling the package
you downloaded as .msi.  There may be something that's
going on here with the .NET/COM interop and this older,
stale assembly sitting in the GAC.  Once you have gone
through and uninstalled, then try building clean.

Part of the build process, immediately after compiling
the Apache.Web assembly, is to register and extract the
.tlb file.  If anything gets in it's way, everything
in building mod_aspdotnet falls apart.

>I was away from .NET development for quite some time
>but, remembering a bit old problems with COM InterOp
>and PINVOKE, somehow this does not surprise me.
>
>What I don't understand is what am I doing wrong and
>how do you guys run ASP module without such basic
>problems?

The 2003 issue is known.  The .NET 1.2 issue is new
to us.

>Yes, I also had a problem (mentioned here) with
>ambiguous symbols compiling mod_aspdotnet.cpp.

Right, that's the item I mentioned.

Sadly, C++ was obviously half-baked when .NET VC was
released, each successive release is changing fairly
radically.

I'd like to improve the error-unwind code - would anyone
care to cook something up for the Apache.Web module?  This
error is emitted/exception occurs within Apache.Web, where
we don't have the COM transistion issues, thankfully.

Bill


Reply via email to