Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java applet socket problem

Status
Not open for further replies.

modalman

Programmer
Feb 14, 2001
156
GB
Hi. I'm writing an applet that uses ftp. Whenever I try to set up a socket just before using the PORT command I get errors. Is this because I need to have permissions set in order to set this socket up?

My code to set the socket up is:(I is a socket that I am using on port 21 to send commands to the server):

try{
localAddress = I.getInetAddress();
svrSkt=new ServerSocket(0,1,localAddress);
}
catch(Exception e){
}

The error I get is:

com.ms.security.SecurityExceptionEx[d.tryPortPasv]: cannot access 0
at com/ms/security/permissions/NetIOPermission.check (NetIOPermission.java)
at com/ms/security/PolicyEngine.deepCheck (PolicyEngine.java)
at com/ms/security/PolicyEngine.checkPermission (PolicyEngine.java)
at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
at com/ms/security/StandardSecurityManager.checkListen (StandardSecurityManager.java)
at java/net/ServerSocket.<init> (ServerSocket.java)
at d.tryPortPasv (d.java)
at Explorer.doCmd (Explorer.java)
at Explorer.getDirList (Explorer.java)

Huge thanks in advance for any help. ASCII silly question, get a silly ANSI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top