Sign in to follow this  
Followers 0
buymeapc

Determine ASP.NET Version

3 posts in this topic

Hi all,

I'm trying to figure out how to determine the ASP.NET version of a folder within IIS. Within IIS, I can easily right click on any folder, click properties, click the ASP.NET tab and view the version that is being used for that particular folder. Is there a way I can automate this? The only thing I could figure out was how to display the version for the root directory, but not any of the subdirectories. The code to do this is below.

#include<array.au3>
#include<Constants.au3>
Dim $array[1]
Dim $obj, $vals, $val, $version

$obj = ObjGet("IIS://" & @ComputerName & "/W3SVC/1/root")
If IsObj($obj) = 0 Then
    MsgBox(0, "", "$obj is not an object")
    Exit
EndIf
$vals = $obj.ScriptMaps

If Not @error Then
    For $val In $vals
        _ArrayAdd($array, $val)
    ;~  If StringInStr($val, ".aspx") <> 0 Then
    ;~      $version =
    Next
    _ArrayDisplay($array)
Else
    MsgBox(0, "", "error")
EndIf

How can I get only one of the folders to display the ASP.NET version and not just the root?

Thanks!

Share this post


Link to post
Share on other sites



Is what I'm looking for even possible since I can only get the "ScriptMaps" from the root the way I'm currently trying?

Share this post


Link to post
Share on other sites

Is there another way of doing this perhaps? Maybe manipulate IIS via a hidden window?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0