Fixed custom HTTP handlers removal in IIS 7.0 provider when updating web site settings

This commit is contained in:
feodor_fitsner 2011-12-20 10:43:43 -08:00
parent eb64f13221
commit 84f0cc724c
2 changed files with 11 additions and 11 deletions

View file

@ -118,16 +118,16 @@ namespace WebsitePanel.Providers.Web.Handlers
if (String.IsNullOrEmpty(processor))
return;
// This section helps to overcome "legacy" issues
using (var srvman = GetServerManager())
{
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
//
var handlersSection = config.GetSection(Constants.HandlersSection);
// Do a complete section cleanup
handlersSection.RevertToParent();
//
srvman.CommitChanges();
}
//using (var srvman = GetServerManager())
//{
// var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
// //
// var handlersSection = config.GetSection(Constants.HandlersSection);
// // Do a complete section cleanup
// handlersSection.RevertToParent();
// //
// srvman.CommitChanges();
//}
//
using (var srvman = GetServerManager())
{

View file

@ -816,7 +816,7 @@ namespace WebsitePanel.Providers.Web
mimeTypesSvc.SetMimeMaps(virtualDir);
// Revert script mappings to the parent to simplify script mappings cleanup
handlersSvc.InheritScriptMapsFromParent(virtualDir.FullQualifiedPath);
//handlersSvc.InheritScriptMapsFromParent(virtualDir.FullQualifiedPath);
// TO-DO: SCRIPT MAPS
#region ASP script mappings