> > MyUtils.IsRefer rerValid(referr er)
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.Cur rent;
if(ctx == null)
return false;
string validDomain = MyUtils.GetSett ingsFromWebConf ig("mydomain") ;
string currentDomain = ctx.Request.Url .Host;
if(currentDomai n.Equals(validD omain))
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