<%@ LANGUAGE="JScript" %>

<%

var domRequest = new ActiveXObject("Microsoft.XMLDOM");
var root;

Init();
HandleRequest();


function Init()
{

	domRequest.async = false;
	domRequest.load(Request);
	root=domRequest.documentElement;
}

function HandleRequest()
{

	try
	{
		domRequest.save(Server.mappath("DirectoryCfg.xml"));
	}
	catch(error)
	{
		Response.buffer=true;
		Response.write("Failed to save configuration file (" + error.description + ")");
		Response.end();
		return;
	}
	Response.buffer=true;
	Response.write("The configuration file has been updated successfully.\nYou must close and restart IIS in order to complete the configuration process.");
	Response.end();

}



%>


