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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inet control FTP problems

Status
Not open for further replies.

afryer

Programmer
Mar 9, 2004
207
GB
Hi All,

I am developing a VB application, which uses the Inet control to perform FTP operations. The website I am trying to connect to is Oracle FTP site, but the only type of user name you can create is in an email format and this cannot changed. This means that my FTP login string looks something like this:

Code:
ftp://myname@mydomain.com:myPassword@updates.oracle.com

The problem is occuring here because the Inet control is reading the FTP site from the first @ symbol, i.e. it is looking from 'mydomain' onwards, which is obviously incorrect.

I have tried various ways to fix this, enclosing the email in quotes etc but nothing has worked. The best idea I can come up with is substituting the @ symbol with its ASCII equivalent, but I cannot find anyway of doing this. Does anyone have any idea of how I can do this or any other suggestions on how I can get round this?

Thanks


Andrew
 
For example, if I had a website called thisismywebsite.co.uk and my login details were
Username: rickyoswaldiow
Password: pass

then my connection string would be

rickyoswaldiow:pass@thisismywebsite.co.uk

*NOTE* The ftp:// prefix is specifiying what protocol to use.
 
Hi,

The problem that I am having though is that the user name is myName@mydomain.com and this cannot be changed. It means that when the FTP command is parsed it will be:

Code:
ftp://myname@mydomain.com:myPassword@updates.oracle.com

username : myName
Password : <blank>
FTP server name : mydomain.com:myPassword@updates.oracle.com

What I need to be able to do is replace the first @ symbol or hide it from being parsed in someway. Once this is done then I would expect to see the following from the above example:

Code:
username : myName@mydomain.com
Password : myPassword
FTP server name : updates.oracle.com

As a point of note if I changed the username to myName.mydomain.com then, whilst not logging in it does not produce any error messages, which is how I determined it was the first @ symbol causing the issue.

I have seen a similar example where single quotes in a URL were replaced by their ASCII equivalent, but cannot find out how to do it.

Thanks



Andrew
 
Does the username have to have an @ in it?

You say:
the user name is myName@mydomain.com and this cannot be changed

Followed shortly by:
I changed the username to myName.mydomain.com

I'd suggest simply using usernames that do not have special characters in them, stick to alphanumeric. If the username really HAS to be in email format, then I'm afraid I don't know the answer :| But I am sure there is a way to do it, someone else might have a suggestion...
 
Hi,

Yes it has to be an email address. When I state I changed it, I meant I changed it in the application as opposed to changing it on the FTP server. I did this to prove to myself that it was the @ symbol that was causing the problem.

Cheers
 
I understand your problem, I think you are on the right track with:
I have seen a similar example where single quotes in a URL were replaced by their ASCII equivalent

Wish I could help, I'd suggest that you keep looking on google and such untill someone here can give you a straight answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top