Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

FTP does not connect :(

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-22-2007, 01:17 PM
Junior Member
 
Join Date: Aug 2007
Posts: 16
Default FTP does not connect :(

Im trying to connect to an ftp but its not working and Im testing it using the ftp DOS command and work properly. See my code, whats wrong?

Code:
Sub btnSincronizarAgora_Click
    ErrorLabel(ErrorConexion)
      Message = 
"Create the object"
    
ftp.New1
    WaitCursor(
True)
    Message = 
"Connecting"
    
ftp.Open(FTP_HOST, FTP_USUARIO, FTP_SENHA)
    WaitCursor(
False)
    ErrorLabel(ErrorListing)
    FTP_ARQUIVOS() = 
ftp.GetEntries()
    goto go1
ErrorConexion:
    Erro(
"Error " & Message)
    
Return
ErrorListing:
    Erro(
"Error listing the files")
    
ftp.Close
    
Return
go1:
    
ftp.Close     
End Sub
Remarks: FTP_HOST, FTP_USUARIO and FTP_SENHA are correctly defined
Reply With Quote
  #2 (permalink)  
Old 08-22-2007, 08:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

What error does it show (comment the ErrorLabel)?
Reply With Quote
  #3 (permalink)  
Old 08-22-2007, 09:02 PM
Junior Member
 
Join Date: Aug 2007
Posts: 16
Default

ftp.Open(...) error:
System.security.Permission.SecurityPermission error
Reply With Quote
  #4 (permalink)  
Old 08-23-2007, 01:02 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by vinians View Post
ftp.Open(...) error:
System.security.Permission.SecurityPermission error
This looks to me like you probably have a .NET Framework Security settings issue. One of the design aims of .NET was to provide security levels that are impossible to achieve in non-managed code and the security settings can be tuned to achieve different levels of security appropriate to different environments.

You need to increase the permissions that B4PPC runs under to allow it to access the Internet. I am not even going to try to advise you on how to do this and the exact way of achieving it is different under .NET 1.1 and .NET 2.0. I suggest that you Google around for ".NET security" or ".NET permissions" and see what you come up with.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic4PPC on Device connect to Delphi Host Xuphas Questions (Windows Mobile) 5 01-20-2012 06:29 AM
how to connect SQLlite on pocketpc thaidelphi Questions (Windows Mobile) 1 08-05-2008 05:01 AM
Please help me FTP I can connect but.... vinians Questions (Windows Mobile) 2 08-29-2007 07:55 PM


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0