You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cli-dev@httpd.apache.org by "James Park (pencil_ethics)" <pe...@gmail.com> on 2006/04/26 13:05:38 UTC
"Announcing" the existence of a mod_aspdotnet port to .NET 2.0
I am please to "announce" that mod_aspdotnet has been successfully
ported to version 2.0 of the .NET Framework. This is essentially trunk
with (a vast number of) syntax changes in Apache.Web to make it compile
with VC8. My statement of "success" basically means it can run trivial
ASP.NET 2.0 applications and a reasonably sized ASP.NET 1.1 application
(Windows Server Update Services) without any noticeable problems. I have
arbitrarily assigned the build number 2005 to this port.
Because of the fact that Managed Extensions for C++ was replaced with
C++/CLI in VC8, numerous syntactical changes were made to the code,
which basically means it requires testing. The major version change in
the .NET Framework also causes the AspNetVersion directive to stop
working (you can try, but it will fail miserably), although I am not
fully sure the version change is the root of the problem. Please keep
in mind that I cannot program in C/C++ myself, but I understand enough
to allow me to port the syntax over to the new C++/CLI style.
Please note this may or may not compile with Visual C++ 2005 Express, as
I do not know its exact capabilities or what is required for Apache.Web
and mod_aspdotnet to compile.
Unfortunately, since 1) I'm not a committer (and never will be),
2) this is a sizeable code change, and 3) I have nowhere to post the
source/binaries to, this is basically just a statement of existence.
Would anyone be interested in having a look? I would be more than happy
to somehow get the source/binaries across to interested parties. As with
code changes of this magnitude, it should be strictly taken as pre-alpha
code, although it just happens to work like production code. ;-)
-- James Park (pencil_ethics)
RE: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by "James Park (pencil_ethics)" <pe...@gmail.com>.
Every time I write something, I always seem to forget something else...
Four extra points that I have to make:
1) By default VC8 doesn't allow you to mix managed and unmanaged types
in a CLR class. I suppressed C4368 to get around this; it doesn't
seem to create any problems.
2) As mentioned in a thread way way back, building Apache.Web with VC8
will throw LNK4248 about unresolved typeref tokens for apr_pool_t,
apr_bucket_alloc_t and apr_table_t. I suspect these occur because
these types are abstract, but in any case the warnings doesn't seem
to cause any problems.
3) By default VC8 will treat wchar_t as a native type which will throw
3 linker errors because of unreferenced symbols to functions like
ConvertBSTRtoString. Of course, this can be avoided by configuring
VC8 to not treat wchar_t as a native type. Again, this doesn't create
any noticeable problems.
4) It is now well known that VC8 has "deprecated" many standard CRT
functions (although MS explains the meaning of "deprecation" in this
context in the documentation). Just to keep the compiler quiet since
the warning means nothing useful, C4996 has been suppressed as well,
instead of defining the macro MS tells you to use instead.
The resulting patch to trunk (repository revision 397545) is about 223
kB. I am currently "testing" the port on my VC6 build of Apache 2.2.2.
The reason I bothered to do this was only because I needed/wanted to
compile mod_aspdotnet for Apache 2.2.2, it refused to compile on VC7.1
and I don't have enough space to install VC7. As they say, necessity
drives creativity (or something like that :-P)... This took the best
part of 2 days (1 for porting 2.0.0, < 1 for figuring out that porting
trunk would be a better idea, and 1 for porting trunk :-P). Because of
this fact, I suspect that bugs lurk hidden in the murky depths of this
code.
The CLA was faxed around 14-15 hours ago. Just get me to fax it again if
it got lost ;-)
-- James Park (pencil_ethics)
Re: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
James Park (pencil_ethics) wrote:
> The thing is, I don't think I should ever get commit access since I only
> know so much C/C++ (I _knew_ I should have made the point earlier),
:) I read that ...
> but it didn't stop me from making a good fist of it ;-) As a result, while I
> can get the whole thing to work, I don't have any good ideas on how to
> completely eliminate that funny C# class. Although I got the jagged
> array syntax correct it seems ;-) In essence, I am not a C/C++
> programmer by trade, hobby, or whatever.
>
> [ virtual array<array<String ^>^> ^GetUnknownRequestHeaders(void) ]
Bravo! Seriously, you need not be a diehard programmer to make contributions(!)
As far as committership, we have a whole subproject dedicated to the art of
not programming (docs@httpd ;-) from where there are many committers.
> Some additional information regarding the port:
>
> 1) ASP.NET 1.x programs will *run* on it quite happily - Windows Server
> Update Services was in business a long time before .NET 2.0 made
> debut. You just can't coerce mod_aspdotnet to *bind* to 1.x Framework
> versions. It really may not make a difference in most scenarios,
> unless MS broke backward compatibility in a very obscure way
> (this of course is purely speculation, but reasonably likely given
> MS's wonderful track record for such things :-P).
Gotcha. Yes, it's the underlying clr we are talking about, not the versions
of specific apps. Hopefully, with .NET 2.0 installed, these continue to run.
> 2) resolve_apache was untouched, but it requires fixing because it will
> not detect Apache 2.2 because it has apache.exe hardcoded as a string
> literal.
Unfortunately it's not that simple :( Compiled against the httpd-2.0 headers,
we must still resolve apache.exe. Compiled against the httpd-2.2 headers, we
can resolve httpd.exe. I'm working on a solution which would install either.
> 3) The installer project was upgraded to InstallShield 11.5, half by
> accident and half by intent. (Accident: forgot to remove the
> installer project from the solution - Intent: only 11.5 works with
> VS2005)
I'm tripping over these, ya.
> Since I have nothing better to do over the next few days, I'll quickly
> fill in the CLA and send it off via fax. It doesn't mean I can receive
> faxes: there is no ink in the fax machine :-P
Sounds great :) I'll ack when I've seen it arrive. With your clue on the
jaggy syntax, we have some hope of merging our work and having this ready
for folks to pick up.
Bill
RE: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by "James Park (pencil_ethics)" <pe...@gmail.com>.
The thing is, I don't think I should ever get commit access since I only
know so much C/C++ (I _knew_ I should have made the point earlier), but
it didn't stop me from making a good fist of it ;-) As a result, while I
can get the whole thing to work, I don't have any good ideas on how to
completely eliminate that funny C# class. Although I got the jagged
array syntax correct it seems ;-) In essence, I am not a C/C++
programmer by trade, hobby, or whatever.
[ virtual array<array<String ^>^> ^GetUnknownRequestHeaders(void) ]
Some additional information regarding the port:
1) ASP.NET 1.x programs will *run* on it quite happily - Windows Server
Update Services was in business a long time before .NET 2.0 made
debut. You just can't coerce mod_aspdotnet to *bind* to 1.x Framework
versions. It really may not make a difference in most scenarios,
unless MS broke backward compatibility in a very obscure way
(this of course is purely speculation, but reasonably likely given
MS's wonderful track record for such things :-P).
2) resolve_apache was untouched, but it requires fixing because it will
not detect Apache 2.2 because it has apache.exe hardcoded as a string
literal.
3) The installer project was upgraded to InstallShield 11.5, half by
accident and half by intent. (Accident: forgot to remove the
installer project from the solution - Intent: only 11.5 works with
VS2005)
Since I have nothing better to do over the next few days, I'll quickly
fill in the CLA and send it off via fax. It doesn't mean I can receive
faxes: there is no ink in the fax machine :-P
-- James Park (pencil_ethics)
Re: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
James, excited to hear this! I had also started the work, and as you well know,
the syntax changes between VS .NET 2002 and VS .NET 2005 for their C++.NET are
intense, if not long overdue.
No more overloading the concepts of an object reference with a true C++ pointer,
using pinning became so much cleaner, etc. If done right, the source code
shrinks in LoC, and the casts are so much easier to read :)
I'm disappointed to hear that we won't be able to support .NET 1.x with the new
flavors, however :-/ Maybe something can be done, most likely, not.
One bit I *really* hope to eliminate is the jaggy arrays issue which required
the additional stub _gcA_gcA_gcString.cs for our unknown request headers, but in
attempting to define the GetUnknownRequestHeader return value, I came up with
nothing <grrr>. MS has promised, of course, to fix jaggy arrays since 2002 came
out, with no results. Every variant of String^^ I tried blew up in the compile,
and no matter what I try, I can't seem to locate the proper c++ declaration
syntax ;(
Anyways, because of the scope of the changes (w/o even looking at your sources)
I expect we will need a CLA (see <http://www.apache.org/licenses/#clas>) which
is a precursor to becoming a committer, anyways. That can be faxed to our
secretary (or snail mailed) - and once that is received I'd be happy to review
and commit your effort!!!
I'd like to branch the existing module and proceed with these changes on trunk/.
As your work beat my effort, I'd rather start with yours (my confidence is not
that high that my obj -> ref's were correct, but I can use a diff of your effort
and mine to make sure everything's on the right track, or possibly catch any
pinning issues your contribution creates.)
Please don't chalk it up as impossible to gain commit access, or if you have
specific concerns, please feel free to bring them up privately, with myself,
or any other PMC member of httpd.
Bill
James Park (pencil_ethics) wrote:
> I am please to "announce" that mod_aspdotnet has been successfully
> ported to version 2.0 of the .NET Framework. This is essentially trunk
> with (a vast number of) syntax changes in Apache.Web to make it compile
> with VC8. My statement of "success" basically means it can run trivial
> ASP.NET 2.0 applications and a reasonably sized ASP.NET 1.1 application
> (Windows Server Update Services) without any noticeable problems. I have
> arbitrarily assigned the build number 2005 to this port.
>
> Because of the fact that Managed Extensions for C++ was replaced with
> C++/CLI in VC8, numerous syntactical changes were made to the code,
> which basically means it requires testing. The major version change in
> the .NET Framework also causes the AspNetVersion directive to stop
> working (you can try, but it will fail miserably), although I am not
> fully sure the version change is the root of the problem. Please keep
> in mind that I cannot program in C/C++ myself, but I understand enough
> to allow me to port the syntax over to the new C++/CLI style.
>
> Please note this may or may not compile with Visual C++ 2005 Express, as
> I do not know its exact capabilities or what is required for Apache.Web
> and mod_aspdotnet to compile.
>
> Unfortunately, since 1) I'm not a committer (and never will be),
> 2) this is a sizeable code change, and 3) I have nowhere to post the
> source/binaries to, this is basically just a statement of existence.
> Would anyone be interested in having a look? I would be more than happy
> to somehow get the source/binaries across to interested parties. As with
> code changes of this magnitude, it should be strictly taken as pre-alpha
> code, although it just happens to work like production code. ;-)
>
> -- James Park (pencil_ethics)
>
>
> .
>
Re: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by Paul Querna <ch...@force-elite.com>.
James Park (pencil_ethics) wrote:
.....
> Unfortunately, since 1) I'm not a committer (and never will be),
This may sound crazy, but as someone who only marginally pays attention
to mod_aspdotnet and this mailing list, why would you say you will never
be a committer?
Committership offers are based on merit, and producing good patches is
the way to get there. (This does sound like a good thing too).
Thanks,
Paul.
Re: "Announcing" the existence of a mod_aspdotnet port to .NET 2.0
Posted by Paul Querna <pq...@apache.org>.
James Park (pencil_ethics) wrote:
.....
> Unfortunately, since 1) I'm not a committer (and never will be),
This may sound crazy, but as someone who only marginally pays attention
to mod_aspdotnet and this mailing list, why would you say you will never
be a committer?
Committership offers are based on merit, and producing good patches is
the way to get there. (This does sound like a good thing too).
Thanks,
Paul.