I get this error Error: The remote server returned an error: 227 Entering Passive Mode (52,157,171,40,242,234)
Hello,
I have written a C#.net program that transfer an xml file to a remote azure virtualmachine(VM). When I get this error from Stream requestStream = request.GetRequestStream()
I retry until it succeeds. When I get the error I have to retry one two or three times until it works.
Here is a sceenshot how it could look like.
I have tried with chatgpt but it isn't anything with firewall and such thing because it works most of the times even if I have to make some retries. I can always send the file even if I have to make some retries. I have google a lot and tried to find anything useful to solve my problem but haven't find anything.
If I look at the log when it works it says
Here is the log when I get an error
So as you can see from the log when this line is written to the log <Date/Time> Info [Type] Message <27-06-2023 10:57:33> FTP Session 652 185.176.247.175 idre [Response] 227 Entering Passive Mode (52,157,171,40,237,122)
I get this line when it works <Date/Time> Info [Type] Message <27-06-2023 11:06:20> FTP Session 653 185.176.247.175 idre [Command] STOR a6109523-a23b-47ed-9732-40ea4535c82f.xml
I get this line when it doesn't work. <Date/Time> Info [Type] Message <27-06-2023 11:10:41> FTP Server [Status] Session 660 ended gracefully.
I do hope that someone can guide me in the right direction to solve this problem because I have run out of ideas because it do works but I have to retry a couple of times.
Many thanks in advance Tony