Jump to content

Determine ASP.NET Version


Recommended Posts

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!

Link to comment
Share on other sites

  • 1 month later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...