Re: How to install filter and extension automatically in IIS 6?

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 07/22/03


Date: Mon, 21 Jul 2003 21:53:14 -0700


I highly discourage you from writing something into metabase.xml directly
because it is not guaranteed to make any server configuration change. The
only instance where modifying metabase.xml will modify the server
configuration is if "Edit while Running" is enabled, and that feature is
disabled by default. It is unreasonable to force a customer to enable some
feature only to install your product when nothing else needs it, and it
makes little sense to do so when ADSI/WMI/ABO setup would work all the time.

Instead, I would encourage you to write ADSI/WMI/ABO code to install an
ISAPI Filter/Extension. I would suggest that you look at using
JScript/VBScript to script the install as it is pretty easy and error-proof
(using C to manipulate ADSI/WMI is laborious, and using ABO is pretty crude
and error prone if you do not know what you are doing).

The tasks you need to do for your filter/extension are:
1. Install the DLL as a Filter
2. Install the DLL as a Wildcard Application Mapping at the appropriate
location
3. Enable the DLL as a Web Service Extension

1.
See Attached email on sample code to install an ISAPI Filter

2.
You need to figure out which metabase node(s) to modify ScriptMaps since it
is possible for your "global" changes to be overriden/removed by UI
operations. i.e. try to first add a scriptmap to Default Web Site, then add
a scriptmap to the global scriptmaps... and notice that the Default Web Site
will not inherit the newly added global scriptmap. You'll need custom code
to reconcile this.

3.
For example, find iisext.vbs in the System32 directory, and it will show you
how to add/remove/modify Web Service Extensions (i.e. allow ISAPI DLL to
execute).

Finally, all three of these tasks can be done via commandline commands
instead of writing custom script.

-- 
//David
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"lqqchen" <lqqchen2002@hotmail.com> wrote in message
news:%23HLQYo$TDHA.212@TK2MSFTNGP10.phx.gbl...
Hi David,
  Can I directly write something into "Metabase.xml" using iostream
operation for my purpose?
  Thanks and kind regards.
lqqchen
"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:uYOPUw7TDHA.2520@tk2msftngp13.phx.gbl...
> Registry hasn't been the configuration store for IIS since IIS5.  You will
> need to use either ADSI/WMI in a Script, or ADSI/WMI/ABO in C code.
>
> What do you actually want to install?  Installing a Filter is very
different
> than an Extension, and each has different requirements.  IIS6 is also more
> strict on your configuration settings for filters and extensions, so if
you
> set things wrong, the server will refuse to run.
>
> --
> //David
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "lqqchen" <lqqchen2002@hotmail.com> wrote in message
> news:O$Bgld2TDHA.3700@tk2msftngp13.phx.gbl...
> Hi all,
>
>    Does anyone know how to install a filter and/or extension automatically
> (That is, the user does not need to add them manually, instead, I can use
a
> installer to do that) for IIS6? Previously I can write registry to install
a
> filter for IIS5.
>
>    Thanks in advance.
>
> lqqchen
>
>
>
>
>
begin 666 Re_ ISAPI filter dll to be configured for a particular website running under iis process.nws
M1G)O;3H@(D1A=FED(%=A;F<@6TUS9G1=(B \<V]M96]N94!O;FQI;F4N;6EC
M<F]S;V9T+F-O;3X-"DYE=W-G<F]U<',Z(&UI8W)O<V]F="YP=6)L:6,N:6YE
M='-E<G9E<BYI:7,-"E)E9F5R96YC97,Z(#QU34%%635(441(02XR-C<V0%1+
M,DU31E1.1U Q,"YP:'@N9V)L/@T*4W5B:F5C=#H@4F4Z($E305!)(&9I;'1E
M<B!D;&P@=&\@8F4@8V]N9FEG=7)E9"!F;W(@82!P87)T:6-U;&%R('=E8G-I
M=&4@<G5N;FEN9R!U;F1E<B!I:7,@<')O8V5S<PT*1&%T93H@5&AU+" S($IU
M;" R,# S(# Q.C(T.C4Y("TP-S P#0I,:6YE<SH@-C0-"E@M4')I;W)I='DZ
M(#,-"E@M35--86EL+5!R:6]R:71Y.B!.;W)M86P-"E@M3F5W<W)E861E<CH@
M36EC<F]S;V9T($]U=&QO;VL@17AP<F5S<R V+C P+C(X,# N,3$U. T*6"U-
M:6UE3TQ%.B!0<F]D=6-E9"!">2!-:6-R;W-O9G0@36EM94],12!6-BXP,"XR
M.# P+C$Q-C4-"@T*2G-C<FEP="X@(%-H;W5L9"!W;W)K(&9O<B!)25,T(&%N
M9"!U<"X@($ET(&UA:V5S(&$@9F5W('-I;7!L:69Y:6YG#0IA<W-U;7!T:6]N
M<RP@8G5T(&ET(&=E=',@=&AE(&UA:6X@<&]I;G0@86-R;W-S.@T*,2X@5V5B
M<VET92!W:71H($E$(&]F(#QW96)S:71E240^(&5X:7-T<PT*,BX@66]U<B!F
M:6QT97(@8V]E>&ES=',@=VET:"!O=&AE<B!F:6QT97)S(&%N9"!W:6QL(&9I
M<F4@049415(@=&AE>2!D;RX-"C,N(#QF:6QT97).86UE/B!D;V5S(&YO="!E
M>&ES= T*#0IV87(@=V5B<VET94E$(#T@(C(B.PT*=F%R(&UA8VAI;F4@/2 B
M;&]C86QH;W-T(CL-"G9A<B!F:6QT97).86UE(#T@(DUY1FEL=&5R(CL-"G9A
M<B!F:6QT97)0871H(#T@(D,Z7%QB:6Y<7&ES87!I9FEL=&5R+F1L;"([#0IV
M87(@<VET949I;'1E<G,[#0H-"G1R>2![#0H@(" @=F%R('-I=&4@/2!'971/
M8FIE8W0H(DE)4SHO+R(@*R!M86-H:6YE("L@(B]W,W-V8R\B("L@=V5B<VET
M94E$*3L-"B @(" O+R!#<F5A=&4@=&AE(&9I;'1E<G,@;F]D92!I9B!I="!D
M;V5S;B=T(&5X:7-T(&%L<F5A9'D-"B @("!S:71E1FEL=&5R<R ]('-I=&4N
M0W)E871E*"))27-&:6QT97)S(BP@(D9I;'1E<G,B*3L-"B @("!S:71E1FEL
M=&5R<RY3971);F9O*"D[#0I](&-A=&-H("AE*2![#0H@(" @<VET949I;'1E
M<G,@/2!'971/8FIE8W0H(DE)4SHO+R(@*R!M86-H:6YE("L@(B]W,W-V8R\B
M("L@=V5B<VET94E$("L-"B(O1FEL=&5R<R(I.PT*?0T*#0IT<GD@>PT*(" @
M("\O($%D9"!T:&4@9FEL=&5R#0H@(" @=F%R(&UY1FEL=&5R(#T@<VET949I
M;'1E<G,N0W)E871E*"))27-&:6QT97(B+"!F:6QT97).86UE*3L-"B @("!M
M>49I;'1E<BY&:6QT97)0871H(#T@9FEL=&5R4&%T: T*(" @(&UY1FEL=&5R
M+E-E=$EN9F\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M%65],3T-!3%]-04-(24Y%+U-94U1%32]#=7)R96YT0V]N=')O;%-E
M="]397)V:6-E<R]7,U-60R]087)A;65T97)S('1O#0IC.EQB:6Y<:7-A<&EF
M:6QT97(N9&QL#0I)('=A;G0@;7D@9&QL('1O('=O<FL@;VYL>2!F;W(@=&AE
M(&1E9FEN960@=V5B('-I=&4@86YD(&YO="!A;&P@=&AE('=E8G-I=&5S#0IR
M=6YN:6YG(&]N(&EI<R!P<F]C97-S+B!097(M=V5B<VET92!C;VYF:6=U<F%T
M:6]N(&ES(')E<75I<F5D("X@22!T:&EN:R!T:&ES#0IC86X@8F4@9&]N92!T
M:')O=6=H($EN=&5R;F5T($EN9F]R;6%T:6]N(%-E<G9I8V5S(%5)(&%N9"!)
M="!A;'-O(&-A;B!B92!D;VYE#0IP<F]G<F%M;6%T:6-A;&QY("AT:')O=6=H
M('-C<FEP=',_*2P@8G5T($D@9&]N)W0@:VYO=R!H;W<@97AA8W1L>2X@268-
M"G!O<W-I8FQE+"!I="!S:&]U;&0@8F4@9&]N92!U<VEN9R!S8W)I<'1S+"!S
M;R!T:&%T(&EN<W1A;&QA=&EO;B!C86X@8F4-"F%U=&]M871E9"X@0VQI96YT
M(&9O<B!W:&EC:"!W92!A<F4@=V]R:VEN9R!A<F4@87!P87)E;G1L>2!R=6YN
M:6YG(&UU;'1I<&QE#0IW96)S:71E<R!O;B!T:&4@<V%M92!)25,@<V5R=F5R
M+"!S;R!I="!W;W5L9"!B92!N:6-E('1O(&%P<&QY(&]U<B!F:6QT97)I;F<-
M"F]N;'D@=&\@8V5R=&%I;B!W96)S:71E<RX-"@T*06YY('!O:6YT97)S(&]N
M('1H:7,@9&ER96-T:6]N('=O=6QD(&)E(&]F(&=R96%T(&AE;' N#0I4:&%N
(:W,-"@T*#0H`
`
end


Relevant Pages

  • help with a home network jumpstart
    ... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ...
    (SunManagers)
  • RE: Shell script build Config.pm file
    ... I am assuming that Perl is installed, ... shell script instead of a Perl script? ... can it be enough to just install the same base config ... storing a configuration using 'o conf commit' CPAN simply calls the ...
    (perl.beginners)
  • Re: Upgrade to 11.04
    ... other is a Clean Install using CD/USB ... I always allow the newer version to install it's new ... configuration files. ... What I need to learn to do is make some sort of script that would ...
    (Ubuntu)
  • Re: [opensuse] Crossover 8.0 pro and opensuse 11.2
    ... It will install OK but when you try to run the Configuration nothing ... There is something wrong with this script. ... Then install the rpm version. ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)
  • Re: Added iviaudioncss.ax to the Problem Codec List
    ... > also the exact same audio compression standard used for MPEG-1 VCDs; ... >> there's another appropriate codec on my system, ... > Only if the audio codec (DS Filter) was properly registered as a Direct ... > Remove Programs" to force a repair install of the affected program. ...
    (microsoft.public.windowsxp.moviemaker)