I get this error
error '80070005'
when I try to run this snippet of code
Set adminManager = CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST/SITE_NAME/"
Set aspSection = adminManager.GetAdminSection("system.webServer/asp","MACHINE/WEBROOT/APPHOST/SITE_NAME/")
Set limitsElement = aspSection.ChildElements.Item("limits")
limitsElement.Properties.Item("maxRequestEntityAllowed").Value = 2147483647
Set limitsElement = aspSection.ChildElements.Item("requestLimits")
limitsElement.Properties.Item("maxAllowedContentLength").Value = 2147483647
Response.Write limitsElement.Properties.Item("maxRequestEntityAllowed").Value & "<br />"
Response.Write limitsElement.Properties.Item("maxAllowedContentLength").Value & "<br />"
adminManager.CommitChanges()
The error occurs in this line:
Set aspSection = adminManager.GetAdminSection("system.webServer/asp","MACHINE/WEBROOT/APPHOST/SITE_NAME/")
I am running on W2008 with IIS 7 with both ASP Classic and ASP.NET installed