MyUtils.IsReferrerValid(referrer)
Is that a class you wrote, Antonio ?
This is what I would write. I haven't coded it, it was just needed
to give some example to my answer.
But that could look like:
---------------------------------------------------
IsReferrerValid(string aReferrer)
{
HttpContext ctx = HttpContext.Current;
if(ctx == null)
return false;
string validDomain = MyUtils.GetSettingsFromWebConfig("mydomain");
string currentDomain = ctx.Request.Url.Host;
if(currentDomain.Equals(validDomain))
return true;
else
return false;
}
---------------------------------------------------
The valid domains list could be a single item in web.config, or an
arraylist retrieved from a database or whatsoever.
Antonio Fontes
http://www.futureblogs.net/antonio