How do you resolve "503 - Not Logged In" error when using FTP

Recently, I created a new website and went through the normal process of setting the site up like other sites. The hosting site is a Windows/IIS server. I could connect via FileZilla, the popular free FTP application, but when I tried via C# code, I could not connect. The error I received was "503 - Logged In".

For Other sites that I own and maintain, I connected via C#. I set up the code as I did with my other sites but could not connect. FileZilla had no issues with connecting. Therefore, the issue would be with my code, so I assumed Filezilla could connect. I changed the security login credentials with other sites, which was fine. I was pretty sure that the issue was on the server.

I contacted the hosting site support and asked them to check. They reinstalled the certificate, and when I tried with FileZilla, it was still working, but when I tried with C#, it didn't work. I went back to the hosting support and asked them to check again, but everything, according to them, was fine.

Any http issue in the 500 range is with the server, so it had to be them. There was nothing untoward in my code. It worked everywhere else, as I said earlier, but not for this one site.

I looked on the internet, including Stackoverflow, where everyone else does, but their solutions weren't appropriate or didn't resolve.

It was suggested that I use a different user account from a friend. I couldn't delete the original FTP account as it is the master account. I created a new account and tried the C# code with that, and lo and behold. I could connect to my web hosting site and upload the file. Issue solved.

I don't know what it was about that FTP account which meant my code didn't work, but creating a new account and using that one resolved the issue. Although my issue is using c#, it could be applied to any programming language or remote server. Issue Solved.

Tags - .NET   FTP

Last Modified : June 2023


About... / Contact.. / Cookie...