Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting application pool name in recycle
Message
De
27/11/2013 21:57:22
 
 
À
24/11/2013 13:29:48
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01588578
Message ID:
01588815
Vues:
28
I have adjusted for the following code when I create the record:
                        ' Grab the friend name of the current application domain
                        lcVirtualDirectory = AppDomain.CurrentDomain.FriendlyName

                        ' Make it like W3SVC/194803890/Root-5-130300803217040174
                        lcVirtualDirectory = Mid(lcVirtualDirectory, 5)

                        ' Make it like W3SVC/194803890/Root-5
                        lcVirtualDirectory = Mid(lcVirtualDirectory, 1, oApp.RAt("-", lcVirtualDirectory) - 1)

                        ' Make it like W3SVC/194803890/Root
                        lcVirtualDirectory = Mid(lcVirtualDirectory, 1, oApp.RAt("-", lcVirtualDirectory) - 1)

                        ' Make it like IIS://localhost/W3SVC/194803890/Root
                        lcVirtualDirectory = "IIS://localhost/" + lcVirtualDirectory

                        loDirectoryEntry = New System.DirectoryServices.DirectoryEntry(lcVirtualDirectory)

                        ' Insert a record in IISApplicationCycle
                        loInsertRow.cAlias = "IISApplicationCycle"
                        loInsertRow.ParameterAdd("Mode", oApp.nApplicationMode)
                        loInsertRow.ParameterAdd("IP", cIP)
                        loInsertRow.ParameterAdd("ProcessID", oApp.nProcessID)
                        loInsertRow.ParameterAdd("Server", oApp.cComputerName)
                        loInsertRow.ParameterAdd("ApplicationPool", loDirectoryEntry.Properties("AppPoolId").Value.ToString)
                        If Not loInsertRow.InsertRow() Then
                            Return False
                        End If
This allows me to get the application pool name.

Some of the classes are part of the framework but that should give a good idea on how to achieve it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform