Max characters in HostName?

Advertisement

p0630034
Joined:
Posts:
5
Location:
Australia

Max characters in HostName?

Hi, scripting in .net and wondering what the maximum length of the SessionOptions.HostName field is.

I have a FTP site with 2 host names bound to it. I have tested both in the WINSCP program and they both connect fine. When scripting, I get an error when trying to connect to it via the longer host name with a character count of 26. The shorter host name with a character count of 24 works.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,390
Location:
Prague, Czechia

Re: Max characters in HostName?

There's no limit. Definitely not less than 26 characters.
Please attach a full session log file both from GUI and the code.

Reply with quote

p0630034
Joined:
Posts:
5
Location:
Australia

Hi Martin,

Did more testing. On the machine that couldn't connect, it failed in the WinSCP program along with the script. They still both went through with the shorter hostname.

The longer hostname however does work in GUI on another machine.
  • longhostnamesuccess.log (9.55 KB, Private file)
  • longhostnamefailscript.log (3.13 KB, Private file)
  • longhostnamefailgui.log (2.31 KB, Private file)

Reply with quote

Advertisement

You can post new topics in this forum