?
Solved

Security exception, only inside the web page: why?

Posted on 2002-05-30
9
Medium Priority
?
216 Views
Last Modified: 2010-03-31
I've an applet that open a socket with the server to read datas.

This class runs good in the appletviewer, but if i open the HTML page witch have the applet inside, i have a Security exception.

What's wrong?
0
Comment
Question by:fab1970
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7045789
Applets can only make network connections to the server that they were loaded from.
0
 

Author Comment

by:fab1970
ID: 7046345
Right. So my applet connect to my PC ip address.

I've build a supertiny winsock "bridge" with VB (that i know a lot more!): it listen on my pc ip address, connect to a intranet ip address, and echoes everything.

The question is always the same: if my applet (that is loaded from my pc) can open a connection with my pc in the applet viewer, why it can't from the HTML page?
0
 
LVL 92

Accepted Solution

by:
objects earned 1200 total points
ID: 7046350
Because applet viewer has less security restrictions than IE or NS.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 7046353
0
 
LVL 92

Expert Comment

by:objects
ID: 7046356
You can remove this restriction by 'signing' the applet.
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 7046655
> I've an applet that open a socket with the server to read datas.

usually applet is allowed to open sockets to it's web server machine only.

new Socket(getCodeBase().getHost(), port) should work fine.
0
 
LVL 92

Expert Comment

by:objects
ID: 7048204
0
 
LVL 35

Expert Comment

by:girionis
ID: 8813336
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to objects@idg

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question