Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

com.ms.security.SecurityExceptionEx(Client.join): cannot access localhost  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
com.ms.security.SecurityExceptionEx(Client.join): cannot access "localhost"
This error is generated when the applet runs inside a browser and tries to open a socket connection(Does not generate an error if run inside appletviewer)
The hostaddr string is initialised earier to a value localhost
private String hostAddr = "localhost";
later this block of code generates an error when applet is run inside a browser
try {
s = new Socket(hostAddr, 1234); // wait for host answer
}catch(Exception e){outputTextArea.setText(e.toString());}
Note:The applet works perfectly fine onpening the socket connection inside an appletviewer but not when same applet is run from inside a browser.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The appletviewer has a much more lax "sandbox" tha real browsers, and will let an applet "get away with" things it should not be allowed to do. You need to digitally sign your applet.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did that and I was able to get an appletinside the browser to write a file to my hard disk but, following the same procedure of digitalsigning for opening network connections error isn't working as of now..will keep informed if things change ..but i read somewhere that sometimes browser is not smart enough to interpret "localhost"...ie.can't understand that the .class file has been loaded from the same machine....if you can elaborate..more cause basically i am trying to get an applet work for a chat program..

[This message has been edited by sandeep (edited July 12, 2000).]
 
rjgopalr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandeep,
I am running into similar kind of problem. have u fixed the problem which u ran into. If yes, can u tell me how to overcome the problem and i don't how to digitally sign a applet to run in IE. Can u send me some material on that also.
Thanks,
Raj
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!