Click here to Skip to main content
15,891,529 members

Comments by Haifovchanin (Top 11 by date)

Haifovchanin 10-Apr-23 2:29am View    
Thanks for an answer!
The code works correctly on real SQL DB.
Your answer is the best. :)
Haifovchanin 27-Mar-23 7:56am View    
This is the query in Proj1, that creates the function.
TypeId (integer) and Timestamp (timestamp) columns are defined in the Log table in Proj1Log project.

CREATE FUNCTION [dbo].[ViewErrorLog]
(
@logType int
)
RETURNS TABLE
AS
RETURN
(
select top(300)
[Id] as 'Id'
,[Time] as 'Time'
,[Application] as 'Application'
,[Text] as 'Error'
from [$(Proj1Log)].[dbo].[Log] with (nolock)
where [TypeId] <= @logType
order by [Timestamp] desc
)
Haifovchanin 29-May-22 7:40am View    
I'm the person who will administer the server.
Now the state is the following:
On the server side, which is the Virtual machine on Azure:
- Firewall has the following open ports for Inbound connections: 21, 990 and 1024-65535 for TCP for both Private and Public networks.
- Firewall has the following open ports for Outbound connections: 20, 989 for TCP for both Private and Public networks.
- FTP Firewall Support is configured with the external IP address.
- FTP Site is set to use self-signed SSL Certificate and SSL Policy is set to "Allow SSL Connections.
- The SLL Certificate was exported without Private Key in Base-64 format and copied to the client's computer.
Azure Network Interface for the VM has corresponding rules for ports 21, 990, 20 and 989 (Allowed TCP connection from/to and IP).
On the client side, which is regular desktop PC:
- Firewall has the following open ports for Inbound connections: 21, 990 and 1024-65535 for TCP for both Private and Public networks.
- Firewall has the following open ports for Outbound connections: 20, 989 for TCP for both Private and Public networks.
In the C# code I still use the
UsePassive = false
line. So, As I understand, the connection type is Active, so all the traffic is via ports 21 and 20 and, for SSL case, via 989 and 990.
Still the SSL connection does not work, but the regular connection - without SSL - works fine.

What I have to do to make the SSL FTP connection work?
Thank you.
Haifovchanin 26-May-22 10:29am View    
You are right. I'm sorry for not including this information.
Thank you for the proposed solution. I'll check it with server administrator.
Haifovchanin 26-May-22 9:53am View    
Yes, I read it once, but with UsePassive set to True this does not work at all. It gives me the exception "The remote server returned an error: 227 Entering Passive Mode" with inner "SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ..."