Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Win32::OLE with IIS AppGetStatus()

Posted on 2004-10-28
5
Medium Priority
?
380 Views
Last Modified: 2012-05-05
I'm trying to use Win32::OLE with IIS 5.0. The AppGetStatus() method is not returning any values when run on an IIsWebDirectory. I've tried this both with and without an application installed on the directory. Code example follows:

use Win32;
use Win32::OLE;

$obj  = Win32::OLE->GetObject("IIS://LocalHost/W3SVC/9/ROOT/foo")
      or die "Can't access IIS on the local machine\n";

print $obj->AppGetStatus();

The IIS 5.0 documentation refers to three constants (APPSTATUS_NOTDEFINED, APPSTATUS_RUNNING, and APPSTATUS_STOPPED) that can be returned, but no values are returned at all, so I can't check on any equality.
0
Comment
Question by:easycgi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Expert Comment

by:sstouk
ID: 12534410
The first thing I would try is to change the user ID, under which the IIS virtual directory, executing this script is running to a Local Administrator - just to check if this is a permission issue and the IIS Anonymous user might have no access to the Object Path.
0
 

Author Comment

by:easycgi
ID: 12536766
The test was ran from the command line while logged in as a Domain Admin.  We can get other objects like the application name just fine.  It is just the GetAppStatus() we are having the problem with.
0
 

Author Comment

by:easycgi
ID: 12746152
So we gave up on using GetAppStatus(), instead we are just checking to see if the FriendlyName exists which accomplishes the same task.  Thanks for your help.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13071133
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question