in reply to Re: IIS/ADSI/Win32-OLE
in thread IIS/ADSI/Win32-OLE
I didn't get any errors, but the array didn't change. I changed things around just to see if I could change anything. I can create redirects for directories off of the wwwroot using a Create("IISWebDirectory") type call, but I can't change any of the IPSecurity settings.
The following code outputs:
when ran:1: 1 2: 0 3: 1
Thanks, JJuse strict; use Win32::OLE; use Win32::OLE::Enum; use Carp; eval { my $newip = "13.11.11.11,255.255.255.255"; my $server = "ogre"; Win32::OLE->Option(Warn => 3); my $secobj = Win32::OLE->GetObject("IIS://$server/W3svc/1/Root") +or croak "Couldn't get object: $!\n"; my $MyIPSec = $secobj->{IPSecurity}; print "1: $MyIPSec->{GrantByDefault}\n"; $MyIPSec->{GrantByDefault} = 0; print "2: $MyIPSec->{GrantByDefault}\n"; $secobj->{IPSecurity}->{GrantByDefault} = 0; $secobj->SetInfo(); print "3: $secobj->{IPSecurity}->{GrantByDefault}\n"; }; print Win32::OLE->LastError()."\n" if (Win32::OLE->LastError());
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: IIS/ADSI/Win32-OLE
by $code or die (Deacon) on Jan 15, 2002 at 15:32 UTC | |
by jjhorner (Hermit) on Jan 15, 2002 at 20:39 UTC |
In Section
Seekers of Perl Wisdom