Answers for "win"

0

win

Set adminManager = WScript.CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT"
adminManager.SetMetadata "pathMapper", "AdministrationConfig"

Set trustedProvidersSection = adminManager.GetAdminSection("system.webServer/management/trustedProviders", "MACHINE/WEBROOT")
Set trustedProvidersCollection = trustedProvidersSection.Collection

Set addElement = trustedProvidersCollection.CreateNewElement("add")
addElement.Properties.Item("type").Value = "Contoso.Provider, System.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=426f62526f636b73"
trustedProvidersCollection.AddElement(addElement)

adminManager.CommitChanges()
Posted by: Guest on May-16-2021
0

win

var adminManager = new ActiveXObject("Microsoft.ApplicationHost.WritableAdminManager"); 
adminManager.CommitPath = "MACHINE/WEBROOT"; 
adminManager.SetMetadata("pathMapper", "AdministrationConfig");

var authenticationSection = adminManager.GetAdminSection("system.webServer/management/authentication", "MACHINE/WEBROOT"); 
var credentialsCollection = authenticationSection.ChildElements.Item("credentials").Collection;

var addElement = credentialsCollection.CreateNewElement("add");
addElement.Properties.Item("name").Value = "ContosoUser";
addElement.Properties.Item("password").Value = "P@ssw0rd";
addElement.Properties.Item("enabled").Value = true;
credentialsCollection.AddElement(addElement);

adminManager.CommitChanges();
Posted by: Guest on May-16-2021
0

win

var adminManager = new ActiveXObject("Microsoft.ApplicationHost.WritableAdminManager"); 
adminManager.CommitPath = "MACHINE/WEBROOT"; 
adminManager.SetMetadata("pathMapper", "AdministrationConfig");

var trustedProvidersSection = adminManager.GetAdminSection("system.webServer/management/trustedProviders", "MACHINE/WEBROOT"); 
var trustedProvidersCollection = trustedProvidersSection.Collection;

var addElement = trustedProvidersCollection.CreateNewElement("add");
addElement.Properties.Item("type").Value = "Contoso.Provider, System.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=426f62526f636b73";
trustedProvidersCollection.AddElement(addElement);

adminManager.CommitChanges();
Posted by: Guest on May-16-2021
0

win

<trustedProviders allowUntrustedProviders="false">
   <add type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <add type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <add type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</trustedProviders>
Posted by: Guest on May-16-2021

Browse Popular Code Answers by Language