-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update sample5.vb Correct VBS code (current is JavaScript). * Update iis/configuration/moduleProviders/index/samples/sample5.vb Correcting back `moduleProvidersCollection` * Apply suggestions from code review Fixed my error, ensured `modulesSection` is used throughout. * Rename sample5.vb to sample5.vbs * Update index.md Updated link for sample5.vbs --------- Co-authored-by: Wade Pickett <[email protected]>
- Loading branch information
1 parent
37634e1
commit 1ed1589
Showing
3 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
iis/configuration/moduleProviders/index/samples/sample5.vb
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
iis/configuration/moduleProviders/index/samples/sample5.vbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager") | ||
adminManager.CommitPath = "MACHINE/WEBROOT" | ||
adminManager.SetMetadata "pathMapper", "AdministrationConfig" | ||
Set modulesSection = adminManager.GetAdminSection("modules", "MACHINE/WEBROOT") | ||
|
||
Set moduleProvidersCollection = modulesSection.Collection | ||
Set addElement = moduleProvidersCollection.CreateNewElement("add") | ||
addElement.Properties.Item("name").Value = "ContosoProvider" | ||
addElement.Properties.Item("type").Value = "Contoso.Provider, System.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=426f62526f636b73" | ||
moduleProvidersCollection.AddElement(addElement) | ||
|
||
adminManager.CommitChanges() |