Re: Migration of ASP Application from W2K to Win2003

From: Mauro (mauro_c_at_mpt-ltd.com)
Date: 02/05/04


Date: Thu, 5 Feb 2004 12:51:39 -0000

David,

thanks for your detailed explanation which has further - though not
completely - clarified the issues.
I will take your advice and recompile ALL VB6 DLLs and then post an update
on this thread.

The complexity for us is that the Win2003 server is not on site so deploying
and registering DLLs
is not simple.

Regards,

Mauro

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:#LIgL$96DHA.3308@TK2MSFTNGP11.phx.gbl...
> I think that my solution is a possible fit for your problem because a VB
> Runtime DLL that works on IIS5 will continue to work on IIS6 in IIS5
> Compatibility mode but FAIL to work on IIS6 Native Mode. This is because
> the VB Runtime is applying its work-around based on the process name, and
in
> IIS6 Native mode, it changed to w3wp.exe.
>
> Thus, it would be beneficial for you to recompile the VB DLLs with both
> "RIM" and "UE" as it makes the VB DLLs "do the right thing" regardless of
> whether the VB Runtime work-around is there or not.
>
> I am not going to say that migration from Win2000 to Win2003 is going to
be
> painless; I'm almost certain things will break due to the sheer number of
> security changes that trumped "compatibility". For example, IIS6, by
> default, breaks just about every single non-trivial web application until
> you understand the security changes and apply them to your situation. ASP
> doesn't even work by default (it did on IIS4/IIS5); you have to take steps
> to enable it; and that is just the beginning.
>
> .Net Interop is wonderful when you wish to move forward with .Net yet
still
> need to preserve an existing codebase. Most of the cases, it just
works --
> for example, I've seen interop start with a native IIS API, use a .Net
class
> through COM Interop, which in turn uses native code interop -- to fetch a
> value from the registry, and everything throughout the entire interop
stack
> just works. If you think about the number of years of technology
> involved, it is truly amazing.
>
> But interop is not magic, and sometimes, the user has to THINK a little
more
> to make sure their situation matches the Interop strategy. I would
consider
> it Microsoft's failure if Interop is unable to solve a particular case. I
> would consider it the customer's failure if the user does not try to
> understand and apply Interop correctly to solve a particular problem.
There
> is no magic pixie dust. Plenty of people have had no problems mixing VB
and
> VB.Net together with ASP and ASP.Net.
>
> In your case, I would first remove any doubts of UE and RIM involvement by
> first recompiling EVERYTHING in VB -- I've seen some cases where a
customer
> recompiled everything but one component, and that one component caused all
> the problems until it was found as the culprit and recompiled.
>
> Then, I want to make sure I understand what you claim to be the problem --
> that a VB6 DLL instantiating a CCW (COM Callable Wrapper) of a .Net
assembly
> fails in IIS6 native mode but not IIS5 Compatibility mode. You seem to
> indicate that the failure can happen in both modes, which pretty much
> removes IIS from the picture and instead focuses on the COM interop. I
> would first look at threading models of the VB component and the .Net
> assembly since it's one of those "details" that VB abstracts away but is
> very important for performant server-side usage. Unfortunately, what is
> easy code for people to write in VB is also very poor code to run on a
> server.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Mauro" <mauro_c@mpt-ltd.com> wrote in message
> news:ePwAVE96DHA.1948@TK2MSFTNGP12.phx.gbl...
> Thanks for your reply from the "inside". We had heard about the new
> VB6RUN.DLL but had no idea whether it was needed or not. Is there a link
to
> download the new DLL from MSDN? From the MSDN "Visual Studio 6 Support
> Centre" page (http://support.microsoft.com/default.aspx?scid=fh;EN-GB;vst)
I
> have only found a link to VS Service Pack 5.
>
> I am not altogether convinced though that your solution applies to our
case
> because
>
> a) the VB6 DLL which is called from the classic ASP code works fine,
> regardless of the IIS compatibility mode
> b) it is only when the VB6 DLL tries to instantiate the type library
> associated to the .NET DLL that we find the error under IIS6.0 isolation
> mode
>
> What's not clear from what you said is whether recompiling the VB DLL with
> the "Unattended Execution" and "Retained in Memory" options selected will
> ensure the work-around is applied when we make the call to the .NET DLL
work
> under IIS6.0 compatibility mode or in both compatibility modes. It would
be
> interesting to have any KB references that explain the problem and
solution
> in more detail.
>
> Also, for some reason that we don't understand after loading and
registering
> a new version of the .NET DLL (and with IIS5.0 isolation mode), the calls
> from the VB6 DLL to the .NET DLL are again failing.
>
> As a final question, what is the benefit in trying to use .NET interop if
> then the migration from Win2K server to Win2003 server will cause all this
> hassle? Microsoft should highlight these problems.
>
> Regards,
>
> Mauro Ciaccio
>
> "David Wang [Msft]" <someone@online.microsoft.com> wrote in message
> news:ePAgMN76DHA.360@TK2MSFTNGP12.phx.gbl...
> > Are you using the latest VB6RUN.DLL ?
> >
> > As a work-around for people who want to run VB DLLs on a web server but
is
> > not able to recompile their bad VB DLLs to have "Retain in Memory", VB
> > Runtime had some special hacks to turn that bit on, based on process
name.
> > IIS6 introduced the w3wp.exe process name in IIS6 Native Worker Process
> > Isolation Mode, which is not recognized by older VB Runtimes, and hence
> bad
> > VB DLLs are not getting the special work-around and will now fail.
These
> > same VB DLLs will work in IIS5 Compatibility mode since dllhost.exe and
> > inetinfo.exe are the same names as before, so the work-around gets
> applied.
> >
> > If this is the cause, the best solution is for you to recompile the VB
DLL
> > such that it has Retain in Memory. This ensures that this problem will
> not
> > occur in the future when run on a web server, no matter the VB Runtime.
> >
> > The reason ASP.Net application works is because it doesn't have a
problem
> > like VB's "Retain in Memory".
> >
> > --
> > //David
> > IIS
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > //
> > "Mauro" <mauro_c@mpt-ltd.com> wrote in message
> > news:O8i%23k$v6DHA.3052@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > We' ve encountered a problem relating to IIS6.0 isolation mode settings
on
> > our new Windows 2003 web server.
> >
> > Our architecture is the following
> > 1) Web application written entirely in ASP. This app carries out all
data
> > access through a VB6 DLL.
> > 2) We recently added a new .NET DLL to save files uploaded by the ASP
into
> > the database, and then copy the file to a directory used by Index
Server.
> > This .NET DLL is registered using regasm which also creates a type
library
> > file.
> > 3) Under our old web server - Windows 2000 - it all runs OK.
> > 4) In the new web server, we've discovered that we need to set the
IIS5.0
> > isolation mode and it all works fine when running from a browser.
> > 5) In the new web server, if we set the IIS6.0 isolation mode the VB6
DLL
> > fails immediately as soon as it tries to invoke the type library when
> > running from a browser.
> > 6) In the new web server, if we set the IIS6.0 isolation mode and run a
> .NET
> > test application as a user belonging to the Administrator group, it all
> > works fine.
> >
> > We would really be interested in knowing if anyone else has come across
> > this, and hearing a sensible explanation for it. To us it doesn't make
> sense
> > that we are running any ASP.NET process given that the web client is an
> ASP
> > application.
> >
> >
> >
> >
>
>
>
>
>
>



Relevant Pages

  • Re-compiling C++ Component that is being interoped by .net assembly
    ... assembly that uses this VB component using interop. ... recompile this C++ dll, it seems to break the .net Assembly. ... I recompile it, I still have issues. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: NEWBIE: use COM Interop or P/Invoke?
    ... If I had the option of interop using COM or P/Invoke I would ... Writing a DLL is simple, if you keep your interop data types simple, P/I is ... And eventually my code will run as a Windows Service. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: simple question
    ... you shouldn't have ANY .vb files out on your production server. ... html you just need deploy that .aspx file to have your change take effect. ... require the .dll to be recompiled and deployed. ... But now, if i make a> MINOR change to a code-behind file, how do i replicate the changes without> having to recompile the whole project and make the whole process again? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: vb6 nt service dot net interop error 429
    ... use COM Interop to create your VB6/COM object that contains all of your ... Server.exe references a vb.net dll via com ... I currently have a vb6 application running as an NT service. ... The method I am using to run the vb6 app as a service is through ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Different Interop generated, but same COM dll - issue
    ... to work does not work anymore, in the RELEASE build, with the Interop ... Interop created from the COM dll that is on the DEV machine, ...
    (microsoft.public.dotnet.framework.interop)