-
URLConnection problem
Hi all,
I've been trying to open a url connection using the follwing code :
.....
.....
URL url = new URL("http://www.yahoo.com");
java.net.URLConnection connection = url.openConnection();
connection.connect();
.....
and I always get the following exception :
{com.ms.security.SecurityExceptionEx detailMessage="cannot
access "http://www.yahoo.com" "}
java.lang.Exception
And that's happening even when I try connecting 2 any other URLs.
Any suggestions ?
best regards,
Nir.
-
Re: URLConnection problem
i ve already met this probleme and it was due to some URL instead of url.Though
i m not sure and i d' like to have some help.
i m looking for an ftp serveur and i m also looking for simple multithreading
applications.
thanks
"Nir" <nir@effective-i.com> wrote:
>
>Hi all,
>I've been trying to open a url connection using the follwing code :
>
>.....
>.....
>
>URL url = new URL("http://www.yahoo.com");
>java.net.URLConnection connection = url.openConnection();
>connection.connect();
>
>.....
>
>and I always get the following exception :
>{com.ms.security.SecurityExceptionEx detailMessage="cannot
> access "http://www.yahoo.com" "}
>java.lang.Exception
>
>And that's happening even when I try connecting 2 any other URLs.
>
>Any suggestions ?
>
>best regards,
>Nir.
-
Re: URLConnection problem
Is this happening in an applet? ("com.ms" leads me to suspect that it is.)
If so, then your problem is that standard applet security prevents an applet
from connecting to any domain except the one it was loaded from.
PC2
<nir@effective-i.com> wrote in message news:3ad30bfe$1@news.devx.com...
>
> i ve already met this probleme and it was due to some URL instead of
url.Though
> i m not sure and i d' like to have some help.
> i m looking for an ftp serveur and i m also looking for simple
multithreading
> applications.
> thanks
>
> "Nir" <nir@effective-i.com> wrote:
> >
> >Hi all,
> >I've been trying to open a url connection using the follwing code :
> >
> >.....
> >.....
> >
> >URL url = new URL("http://www.yahoo.com");
> >java.net.URLConnection connection = url.openConnection();
> >connection.connect();
> >
> >.....
> >
> >and I always get the following exception :
> >{com.ms.security.SecurityExceptionEx detailMessage="cannot
> > access "http://www.yahoo.com" "}
> >java.lang.Exception
> >
> >And that's happening even when I try connecting 2 any other URLs.
> >
> >Any suggestions ?
> >
> >best regards,
> >Nir.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|