private static void ValidateUser(string username, string password, bool allowServiceAccess)
{
if (!Config.Settings.AllowServiceAccess || !allowServiceAccess)
{
throw new XmlRpcFaultException(0, "Web Service Access is not enabled.");
}
bool isValid = SecurityHelper.IsValidUser(username, password);
if (!isValid)
{
throw new XmlRpcFaultException(0, "Username and password denied.");
}
}