I have the below code.. executing from .NET APP

System.Uri objUri;
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;

try
{
objUri = new System.Uri(strWebLink);
objWebReq = System.Net.WebRequest.Create(objUri);
objResp = objWebReq.GetResponse();
objResp.Close();
objWebReq = null;
return true;
}
catch
{
objWebReq = null;
return false;
}

and a Software policy restriction, that prevents from accessing Internet
through IE.

It works ok ( I get return true when internet is present) if the strWebLink
is say www.mydomain.com/admintest.aspx , but if I give it as
www.mydomain.com/admintest.asmx it fails ( I get return false when internet
is present). All this happens on XP SP2 box.

what is the difference??

VJ

Re: System.Net.WebRequest.Create by Vadym

Vadym
Thu Jan 12 03:20:04 CST 2006

It would be much easier to answer your question if you will specify the
details about the exception...
--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"VJ" <vijaybalki@yahoo.com> wrote in message
news:Oa7Q50xFGHA.532@TK2MSFTNGP15.phx.gbl...
>I have the below code.. executing from .NET APP
>
> System.Uri objUri;
> System.Net.WebRequest objWebReq;
> System.Net.WebResponse objResp;
>
> try
> {
> objUri = new System.Uri(strWebLink);
> objWebReq = System.Net.WebRequest.Create(objUri);
> objResp = objWebReq.GetResponse();
> objResp.Close();
> objWebReq = null;
> return true;
> }
> catch
> {
> objWebReq = null;
> return false;
> }
>
> and a Software policy restriction, that prevents from accessing Internet
> through IE.
>
> It works ok ( I get return true when internet is present) if the
> strWebLink is say www.mydomain.com/admintest.aspx , but if I give it as
> www.mydomain.com/admintest.asmx it fails ( I get return false when
> internet is present). All this happens on XP SP2 box.
>
> what is the difference??
>
> VJ
>