B
Brett R. Wesoloski
I am having problems using HttpContext.Current.Request.Url.Host.
I have some code that does this...
if (HttpContext.Current != null)
{
subdomain = HttpContext.Current.Request.Url.Host;
}
Now if I put a break point on the if statement I get this error for the
HttpContext.Current.Request. Request: 'HttpContext.Current.Request' threw
an exception of type 'System.Web.HttpException'
Now if I comment out the subdomain = HttpContext.Current.Request.Url.Host;
and stop at the same break point it works fine.
Now this seems to be a problem with the 3.5 framework because after I
installed it, this code seemed to not work any more.
Any idea's?
TIA,
Brett
I have some code that does this...
if (HttpContext.Current != null)
{
subdomain = HttpContext.Current.Request.Url.Host;
}
Now if I put a break point on the if statement I get this error for the
HttpContext.Current.Request. Request: 'HttpContext.Current.Request' threw
an exception of type 'System.Web.HttpException'
Now if I comment out the subdomain = HttpContext.Current.Request.Url.Host;
and stop at the same break point it works fine.
Now this seems to be a problem with the 3.5 framework because after I
installed it, this code seemed to not work any more.
Any idea's?
TIA,
Brett