Get status of a virtual directory 
Author Message
 Get status of a virtual directory

Hi,

I need to find the status of the virtual directory.
I referred to the information regarding this functionality
at
http://www.*-*-*.com/
t.asp?url=/windows2000/en/advanced/iis/htm/asp/aore0x0z.htm

It doest not work both in JavaScript and VBScript. I have
attached my test page developed in JavaScript. It shows
the error as "Wrong number of arguments or invalid
property assignment". If I pass some integer, then it
says "undefined".

All the other methods work i.e., AppEnable(), AppDisable
(), AspAppRestart() etc., work fine. I face problem only
with AppGetStatus() method

Kindly tell me what the reason could be or else whether I
had used it wrongly.

Thanks,
Smiles

  iis_adsi.asp
< 1K Download


Mon, 06 Sep 2004 21:26:22 GMT  
 Get status of a virtual directory
Even the VBScript example of AppGetStatus in the docs doesn't work...

If you snoop

Library IISExt
    C:\WINNT\System32\iisext.dll
    Active DS IIS Extension Dll

with an object browser (like VB's) you'll find:

Sub AppGetStatus(pdwStatus As <Unsupported variant type>)
    Member of IISExt.IISApp

But there is also:

Function AppGetStatus2() As Long
    Member of IISExt.IISExtApp

So the following works (on Win2000 Pro):


<%
try{
 var objDir = GetObject("IIS://localhost/W3SVC/1/ROOT/VirDirectory");
 var strState = objDir.AppGetStatus2();
 Response.Write("Status : " + strState);

Quote:
}

catch(err){
 Response.Write(err.number + " : " + err.description);
Quote:
}

%>

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:

> Hi,

> I need to find the status of the virtual directory.
> I referred to the information regarding this functionality
> at
> http://www.microsoft.com/windows2000/en/advanced/iis/defaul
> t.asp?url=/windows2000/en/advanced/iis/htm/asp/aore0x0z.htm

> It doest not work both in JavaScript and VBScript. I have
> attached my test page developed in JavaScript. It shows
> the error as "Wrong number of arguments or invalid
> property assignment". If I pass some integer, then it
> says "undefined".

> All the other methods work i.e., AppEnable(), AppDisable
> (), AspAppRestart() etc., work fine. I face problem only
> with AppGetStatus() method

> Kindly tell me what the reason could be or else whether I
> had used it wrongly.

> Thanks,
> Smiles



Tue, 07 Sep 2004 05:41:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using AppGetStatus on IIS web directory or virtual directory object

2. Virtual Directory : Default Document using vbscript

3. FSO with virtual Directory

4. Virtual directories

5. Accessing a Virtual Directory

6. Create IIS Virtual Directory Automatically

7. Problems with FileExists in a virtual directory ?

8. Can FSO work with files on virtual directory?

9. Upload files using aspSmartUpload to virtual directory

10. IIS virtual directory subfolder question

11. Virtual Directory and VBScript

12. Creating and destroying virtual directories on the fly

 

 
Powered by phpBB® Forum Software