- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用 ASP.NET 和 C# 创建文件传输应用程序,我在其中将文件从 FTP 位置传输到我的服务器位置。这在过去的 5 年里运行良好,但在那之后我就遇到了错误。
The remote server returned an error: 150 Opening data channel for file download from the server
我正在使用的代码如下
private string script = @"setTimeout(""__doPostBack('{0}','')"", 3000);";
protected int totalSteps = (intCount == 0 ? 1 : intCount);
private int blockWidth = 860 / (intCount == 0 ? 1 : intCount);
private string styles = @"
<style type=""text/css"">
.Hide {{ display:none; }}
.ProgressWrapper {{ height:18px; width:{0}px;
border:solid 1px #9C9C9C;font-size:9pt; padding:5px; background-color:#ddd; }}
.Progress {{ height:15px; background-color:#0059FF;
border:solid 1px #003EB0; float:left; }}
</style>
";
public bool Processing
{
get
{
return (bool)(Session["Processing"] ?? false);
}
set
{
Session["Processing"] = value;
}
}
public int Step
{
get
{
return (int)(Session["Step"] ?? 0);
}
set
{
Session["Step"] = value;
}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (this.Processing)
{
if (!string.IsNullOrEmpty(this.LastStatus))
{
this.pnlProgress.Width = new Unit(this.Step * this.blockWidth);
if (this.Status == "Transfer" || this.Status == "Delete")
{
//some controls logic
}
if (this.Status == "TransferA" || this.Status == "DeleteD")
{
fBindClientGrid(this.FTPP, this.Label);
//some controls logic
}
this.lblMessage.Text += string.Format("<br />{0}", this.LastStatus);
this.LastStatus = string.Empty;
}
if (Session["ID"] == null)
ScriptManager.RegisterStartupScript(this, this.GetType(),
this.GetType().Name, string.Format(script, this.upnlCustomer.UniqueID),
true);
}
else
{
if (!this.Completed)
{
this.pnlProgress.Width = new Unit(860);
if (this.Status == "TransferA" || this.Status == "DeleteD")
{
fBindClientGrid(this.FTPP, this.Label);
}
fBindSubClientGrid(strTodaysDate);
this.lblMessage.Text += string.Format("<br />{0}", this.LastStatus);
lblMessage.Text += "<br />Processing Is Completed At " + DateTime.Now.ToString("HH:mm:ss") + "";
lblTransferStatus.Text = strfinalstatus;
}
else
{
this.Step = 0;
}
}
}
void SomeLongOperation()
{
this.Completed = false;
List<string> lstArray = new List<string>();
rdrCustomerCredentials.Close();
rdrCustomerCredentials.Dispose();
CreateFolder(strPath, strClientpath, strClientUser, strClientPwd, strTodaysDate);
if (txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("'", "''").Replace("é", "e") != strTodaysDate.Replace(ddlSubClient.SelectedValue.Split('^')[0], ""))
{
CreateFolder((strPath + strTodaysDate + "/"), strClientpath + strTodaysDate + "/", strClientUser, strClientPwd, txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("é", "e"));
}
if (mySql.pReturnIntegerValue("SELECT COUNT(*) FROM CMTB****hMaster WHERE BatchName='" + txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("'", "''").Replace("é", "e") + "' AND MTSubClientID=" + intSubClientID + " AND FolderName='" + strTodaysDate + "'") == 0)
{
strResult = ""; // here i add some operation to save data into my database
}
int i = 0;
intCount = (gvCustomer.Rows.Count == 0 ? 1 : gvCustomer.Rows.Count);
if (strResult == "")
{
for (int intLoop = 0; intLoop < gvCustomer.Rows.Count; intLoop++)
{
if (((CheckBox)gvCustomer.Rows[intLoop].Cells[0].FindControl("chkSelect")).Checked == true && ((LinkButton)gvCustomer.Rows[intLoop].Cells[2].FindControl("lnkLink")).Text.ToLower().Trim().Replace("\r\n", "").Replace("\n", "").Replace("//", "/").Contains(".ds2") == false && ((CheckBox)gvCustomer.Rows[intLoop].Cells[0].FindControl("chkSelect")).Enabled == true)
{
i++;
string strFileName = ((LinkButton)gvCustomer.Rows[intLoop].Cells[2].FindControl("lnkLink")).Text.Trim().Replace("\r\n", "").Replace("\n", "").Replace("//", "/");
string strConvFileName = ((TextBox)gvCustomer.Rows[intLoop].Cells[3].FindControl("txtConvertedFile")).Text.Trim().Replace("\r\n", "").Replace("\n", "").Replace("//", "/").Replace(" ", "").Replace("~", "-").Replace("é", "e");
this.Step = this.Step + 1;
if (txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("é", "e") != strTodaysDate.Replace(ddlSubClient.SelectedValue.Split('^')[0], ""))
{
strResult = RecursiveDownload((strPath + strTodaysDate + "/" + txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("é", "e") + "/"), strCustomerpath, strUser, strPwd, strClientpath + strTodaysDate + "/" + txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "") + "/", strClientUser, strClientPwd, strFileName, strConvFileName, gvCustomer.Rows[intLoop].Cells[4].Text, gvCustomer.Rows[intLoop].Cells[5].Text);
strInputPath = strInpPath + strTodaysDate + "/" + txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("é", "e") + "/";
}
else
{
strResult = RecursiveDownload((strPath + strTodaysDate + "/"), strCustomerpath, strUser, strPwd, strClientpath + strTodaysDate + "/", strClientUser, strClientPwd, strFileName, strConvFileName, gvCustomer.Rows[intLoop].Cells[4].Text, gvCustomer.Rows[intLoop].Cells[5].Text);
strInputPath = strInpPath + strTodaysDate + "/";
}
string status = string.Format("Step {0} - {1}", i,
strResult == "" ? "Successfully Transferred " + strFileName + " at " + DateTime.Now.ToString("HH:mm:ss") : "Failed " + strFileName + " - Due to {" + strResult.Replace("'", "") + "}");
string status1 = "";
if (txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("'", "''").Replace("é", "e") != strTodaysDate.Replace(ddlSubClient.SelectedValue.Split('^')[0], ""))
{
status1 = string.Format("Step {0} - {1}", i,
strResult == "" ? "Successfully Transferred " + strFileName + " From " + (strCustomerpath) + " To " + strPath + strTodaysDate + "/" + txtBatchName.Text.Trim().Replace("&", "").Replace("%", "").Replace("/", "").Replace(@"\", "").Replace("*", "").Replace(":", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "").Replace("'", "''").Replace("é", "e") + "/" + " at " + DateTime.Now.ToString("HH:mm:ss") + " \n\r \n\r" : "Failed " + strFileName + " - Due to {exception details} \n\r \n\r");
}
else
{
status1 = string.Format("Step {0} - {1}", i,
strResult == "" ? "Successfully Transferred " + strFileName + " From " + (strCustomerpath) + " To " + strPath + strTodaysDate + "/" + " at " + DateTime.Now.ToString("HH:mm:ss") + " \n\r \n\r" : "Failed " + strFileName + " - Due to {exception details} \n\r \n\r");
}
if (string.IsNullOrEmpty(this.LastStatus))
this.LastStatus = status;
else
this.LastStatus = string.Format("{0}<br /><br />{1}", this.LastStatus, status);
System.IO.StreamWriter file = new System.IO.StreamWriter(Server.MapPath("LogFilesForFileTransfer") + @"\FileTransferLog" + DateTime.Now.ToString("MM-dd-yyyy") + ".txt", true);
file.WriteLine(status1);
file.Close();
Thread.Sleep(1000);
}
}
}
if (strResult == "")
{
strfinalstatus = "Successfully Transferred All The Files";
}
else
{
strfinalstatus = strResult;
}
this.Processing = false;
}
protected string RecursiveDownload(string strPath, string strFtpPath, string strFtpUser, string strFtpPwd, string strSubClientFTPPath, string strSubClientFTPUser, string strSubClientFTPPwd, string strFileName, string strConvFileName, string strType, string strFileSize)
{
string strResult = "";
List<string> lstArray = new List<string>();
if (strType != "" && strType != " ")
{
strResult = TransferFile(strPath, strFtpPath, strFtpUser, strFtpPwd, strSubClientFTPPath, strSubClientFTPUser, strSubClientFTPPwd, strFileName, strConvFileName, strFileSize);
}
else
{
string strDirectoryInfo = fReturnDirectoryInfo1(strPath + strFileName, strFtpUser, strFtpPwd);
string[] strSplit = strDirectoryInfo.Split('?');
CreateFolder(strPath, strSubClientFTPPath, strSubClientFTPUser, strSubClientFTPPwd, strFileName);
if (strDirectoryInfo != "")
{
for (int intLoop = 0; intLoop < strSplit.Length; intLoop++)
{
strResult = RecursiveDownload(strPath + strFileName + "/", strFtpPath + strFileName + "/", strFtpUser, strFtpPwd, strSubClientFTPPath + strFileName + "/", strSubClientFTPUser, strSubClientFTPPwd, strSplit[intLoop].Split(':')[1],
strSplit[intLoop].Split(':')[1], strSplit[intLoop].Split(':')[0], strFileSize);
}
}
}
return strResult;
}
protected string TransferFile(string strPath, string strFtpPath, string strFtpUser, string strFtpPwd, string strSubClientFTPPath, string strSubClientFTPUser, string strSubClientFTPPwd, string strFileName, string strConvFileName, string strFileSize)
{
string strSuccess = "";
FtpWebRequest reqFTP;
try
{
if (File.Exists(strPath + strConvFileName))
{
Size = ((Math.Round(Convert.ToDouble(new FileInfo(strPath + strConvFileName).Length)) > 0 && Math.Round(Convert.ToDouble(new FileInfo(strPath + strConvFileName).Length)) < 1024) ? 1 : (Math.Round(Convert.ToDouble(new FileInfo(strPath + strConvFileName).Length) / 1024 + 0.0001)));
strLocalFileSize = Size + "KB";
}
if (!File.Exists(strPath + strConvFileName) || strFileSize != strLocalFileSize)
{
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(strFtpPath + strFileName.Replace("#", "%23")));
System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
reqFTP.EnableSsl = true;
reqFTP.Timeout = Timeout.Infinite;
reqFTP.KeepAlive = true;
reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
//reqFTP.UseBinary = true;
//reqFTP.UsePassive = false;
reqFTP.Credentials = new NetworkCredential(strFtpUser, strFtpPwd);
FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
Stream ftpStream = response.GetResponseStream();
long cl = response.ContentLength;
int bufferSize = 2048;
int readCount;
byte[] buffer = new byte[bufferSize];
readCount = ftpStream.Read(buffer, 0, bufferSize);
FileStream outputStream = new FileStream(strPath +
strConvFileName, FileMode.Create);
while (readCount > 0)
{
outputStream.Write(buffer, 0, readCount);
readCount = ftpStream.Read(buffer, 0, bufferSize);
}
ftpStream.Close();
outputStream.Close();
response.Close();
strSuccess = "";
}
else
{
strSuccess = "File Exists";
}
}
catch (Exception ex)
{
strSuccess = ex.Message;
}
return strSuccess;
}
我还尝试了 PASSIVE 和 SSL 等的不同设置。但是,我还是明白了。
注意:- FTP 客户端在此之后更改其端口,我收到此错误。所以这是客户端的一部分,还是我必须更改我的代码中的任何内容?
希望您理解我的问题,如果您正在阅读我的问题但无法理解,请通过评论回复与我联系。
使用 WebRequest
的输出日志如下。这是针对 3 个文件,其中第一个和第二个文件传输但第三个文件出错。
[Subject]
CN=*.h************d.net, OU=Domain Control Validated
Simple Name: *.h************d.net
DNS Name: h************d.net
[Issuer]
CN=Go Daddy Secure Certificate Authority - G2, OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", L=Scottsdale, S=Arizona, C=US
Simple Name: Go Daddy Secure Certificate Authority - G2
DNS Name: Go Daddy Secure Certificate Authority - G2
[Serial Number]
00***********CF
[Not Before]
06/23/2019 11:20:31 PM
[Not After]
06/23/2021 5:48:21 AM
[Thumbprint]
043**************31991F8A
[Signature Algorithm]
sha256RSA(1.2.840.113549.1.1.11)
[Public Key]
Algorithm: RSA
Length: 2048
Key Blob: 30 82 01 0a 02 82 01 01 00 b3 08 29 d4 49 ab a0 ce 70 cd b2 72 1e 99 50 2f 63 9a 8c 95 8e c5 54 7b 66 bc 37 c3 81 b6 38 cb a8 aa f5 bc 95 99 94 2a de 11 73 5b b3 ed 00 ad dd 39 0b e1 52 b2 80 82 61 3c e5 37 15 92 f2 f8 6a fa ef 05 98 e2 f5 33 35 0d 09 0f 1d 14 1a a9 c8 e7 cd 04 87 a1 67 1....
System.Net Information: 0 : [12876] SecureChannel#29899600 - Remote certificate has errors:
System.Net Information: 0 : [12876] SecureChannel#29899600 - Certificate name mismatch.
System.Net Information: 0 : [12876] SecureChannel#29899600 - Remote certificate was verified as valid by the user.
System.Net Information: 0 : [12876] ProcessAuthentication(Protocol=Tls, Cipher=Aes256 256 bit strength, Hash=Sha1 160 bit strength, Key Exchange=44550 256 bit strength).
System.Net Error: 0 : [12876] Decrypt failed with error 0X90317.
System.Net Information: 0 : [12876] FtpControlStream#35723434 - Received response [226 Successfully transferred "/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19"]
System.Net Information: 0 : [12876] FtpWebRequest#29959295::(Releasing FTP connection#35723434.)
System.Net Information: 0 : [6012] ServicePoint#37369992 - Closed as idle.
System.Net Information: 0 : [1608] FtpWebRequest#9486968::.ctor(ftp://7*.***.***.***:11121/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE %23 HP-ROR7506(********) ********, ******** 09-26-19 MED REC KIM ********.doc)
System.Net Information: 0 : [1608] FtpWebRequest#9486968::GetResponse(Method=RETR.)
System.Net Information: 0 : [1608] Associating FtpWebRequest#9486968 with FtpControlStream#34452536
System.Net Information: 0 : [1608] FtpControlStream#34452536 - Sending command [PASV]
System.Net Information: 0 : [1608] FtpControlStream#34452536 - Received response [227 Entering Passive Mode (7*,***,***,***,205,37)]
System.Net Information: 0 : [1608] FtpControlStream#34452536 - Sending command [RETR RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE # HP-ROR7506(********) ********, ******** 09-26-19 MED REC KIM ********.doc]
System.Net Information: 0 : [1608] FtpControlStream#34452536 - Received response [150 Opening data channel for file download from server of "/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE # HP-ROR7506(********) ********, ******** 09-26-19 MED REC KIM ********.doc"]
System.Net Information: 0 : [1608] TlsStream#38212950::.ctor(host=7*.***.***.***, #certs=0, checkCertificateRevocationList=False, sslProtocols=Default)
System.Net Information: 0 : [1608] SecureChannel#52936877::.ctor(hostname=7*.***.***.***, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [1608] SecureChannel#52936877 - Left with 0 client certificates to choose from.
System.Net Information: 0 : [1608] Using the cached credential handle.
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=135, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b56e008, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b56e008, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b56e008, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b56e008, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=134, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] FtpWebRequest#9486968::(Releasing FTP connection#34452536.)
System.Net Error: 0 : [1608] Exception in FtpWebRequest#9486968::GetResponse - The remote server returned an error: 150 Opening data channel for file download from server of "/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE # HP-ROR7506(********) ********, ******** 09-26-19 MED REC KIM ********.doc"
..
at System.Net.FtpWebRequest.SyncRequestCallback(Object obj)
at System.Net.FtpWebRequest.RequestCallback(Object obj)
at System.Net.CommandStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Stream.Dispose()
at System.Net.ConnectionPool.Destroy(PooledStream pooledStream)
at System.Net.ConnectionPool.PutConnection(PooledStream pooledStream, Object owningObject, Int32 creationTimeout, Boolean canReuse)
at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage)
at System.Net.FtpWebRequest.GetResponse()
System.Net Information: 0 : [1608] FtpWebRequest#55445276::.ctor(ftp://7*.***.***.***:11121/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE %23 HP-ROR7507(********) ********.doc)
System.Net Information: 0 : [1608] FtpWebRequest#55445276::GetResponse(Method=RETR.)
System.Net Information: 0 : [1608] Associating FtpWebRequest#55445276 with FtpControlStream#35723434
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Sending command [CWD /]
System.Net Information: 0 : [1988] FtpWebRequest#23551555::.ctor(ftp://7*.***.***.***:11121/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/)
System.Net Information: 0 : [1988] FtpWebRequest#23551555::GetResponse(Method=LIST.)
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Received response [250 CWD successful. "/" is current directory.]
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Sending command [PASV]
System.Net Information: 0 : [1988] FtpControlStream#15713638 - Created connection from 10.200.10.35:56838 to 7*.***.***.***:11121.
System.Net Information: 0 : [1988] Associating FtpWebRequest#23551555 with FtpControlStream#15713638
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Received response [227 Entering Passive Mode (7*,***,***,***,205,62)]
System.Net Information: 0 : [1988] FtpControlStream#15713638 - Received response [220-FileZilla Server 0.9.60 beta
220-written by Tim Kosse (Tim.Kosse@gmx.de)
220 Please visit https://filezilla-project.org/]
System.Net Information: 0 : [1988] FtpControlStream#15713638 - Sending command [AUTH TLS]
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Sending command [RETR RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE # HP-ROR7507(********) ********.doc]
System.Net Information: 0 : [1988] FtpControlStream#15713638 - Received response [234 Using authentication type TLS]
System.Net Information: 0 : [1988] TlsStream#56336575::.ctor(host=7*.***.***.***, #certs=0, checkCertificateRevocationList=False, sslProtocols=Default)
System.Net Information: 0 : [1988] FtpControlStream#15713638 - Sending command [USER ********]
System.Net Information: 0 : [1988] SecureChannel#47899302::.ctor(hostname=7*.***.***.***, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [1988] SecureChannel#47899302 - Left with 0 client certificates to choose from.
System.Net Information: 0 : [1988] Using the cached credential handle.
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=103, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=134, returned code=ContinueNeeded).
System.Net Information: 0 : [1608] FtpControlStream#35723434 - Received response [150 Opening data channel for file download from server of "/RECORDS REVIEW/FROM TRANSCRIBER/2019/10 October 2019/10-09-19/INVOICE # HP-ROR7507(********) ********.doc"]
System.Net Information: 0 : [1608] TlsStream#50391717::.ctor(host=7*.***.***.***, #certs=0, checkCertificateRevocationList=False, sslProtocols=Default)
System.Net Information: 0 : [1608] SecureChannel#56638896::.ctor(hostname=7*.***.***.***, #clientCertificates=0, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [1608] SecureChannel#56638896 - Left with 0 client certificates to choose from.
System.Net Information: 0 : [1608] Using the cached credential handle.
System.Net Information: 0 : [1608] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1608] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=103, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [1988] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 81e3228:b4d7158, targetName = 7*.***.***.***, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [1988] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=OK).
System.Net Information: 0 : [1988] Remote certificate: [Version]
V3
最佳答案
我不是 100% 确定这是否相关但是......
我们遇到了完全相同的问题,并且在经过多年的正常工作后昨天才开始出现,客户端我们从服务器收到与您相同的 FTP“150”响应,但是如果我们检查服务器日志,则会出现更严重的问题上,我们得到:
450 TLS session of data connection has not resumed or the session does not match the control connection
由于这是一个最近才出现的问题,并且只有我们的少数客户发现,我们已经设法将潜在问题缩小到 3 个 Windows 更新,但我不确定它们发生了什么变化:
我们的一位客户回滚了这些更新,我们的软件再次开始为他们正常工作。
由于我们不能期望我们的客户回滚安全更新,因此我们目前使用的解决方法是关闭“使用 PROT P 时需要在数据连接上恢复 TLS session ” 设置服务器,但这具有附加的安全隐患,因此不是一个可靠的解决方案。
我个人怀疑其中一个更新搞砸了 FtpWebRequest
类的工作方式,也许它不再自行处理 TLS session 恢复。
根据我在互联网上阅读的内容,我拼命寻找与这个构建在 FtpWebRequest
类上并自行处理 TLS session 恢复的大多数商业 FTP 客户端相关的内容。
关于c# - FTP 下载工作多年后突然收到 "150 Opening Data channel for file download from server",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58297792/
我在Windows 10中使用一些简单的Powershell代码遇到了这个奇怪的问题,我认为这可能是我做错了,但我不是Powershell的天才。 我有这个: $ix = [System.Net.Dn
var urlsearch = "http://192.168.10.113:8080/collective-intellegence/StoreClicks?userid=" + userId +
我有一个非常奇怪的问题,过去两天一直让我抓狂。 我有一个我试图控制的串行设备(LS 100 光度计)。使用设置了正确参数的终端(白蚁),我可以发送命令(“MES”),然后是定界符(CR LF),然后我
我目前正试图让无需注册的 COM 使用 Excel 作为客户端,使用 .NET dll 作为服务器。目前,我只是试图让概念验证工作,但遇到了麻烦。 显然,当我使用 Excel 时,我不能简单地使用与可
我开发了简单的 REST API - https://github.com/pavelpetrcz/MandaysFigu - 我的问题是在本地主机上,WildFly 16 服务器的应用程序运行正常。
我遇到了奇怪的情况 - 从 Django shell 创建一些 Mongoengine 对象是成功的,但是从 Django View 创建相同的对象看起来成功,但 MongoDB 中没有出现任何数据。
我是 flask 的新手,只编写了一个相当简单的网络应用程序——没有数据库,只是一个航类搜索 API 的前端。一切正常,但为了提高我的技能,我正在尝试使用应用程序工厂和蓝图重构我的代码。让它与 pus
我的谷歌分析 JavaScript 事件在开发者控制台中运行得很好。 但是当从外部 js 文件包含在页面上时,它们根本不起作用。由于某种原因。 例如; 下面的内容将在包含在控制台中时运行。但当包含在单
这是一本名为“Node.js 8 the Right Way”的书中的任务。你可以在下面看到它: 这是我的解决方案: 'use strict'; const zmq = require('zeromq
我正在阅读文本行,并创建其独特单词的列表(在将它们小写之后)。我可以使它与 flatMap 一起工作,但不能使它与 map 的“子”流一起工作。 flatMap 看起来更简洁和“更好”,但为什么 di
我正在编写一些 PowerShell 脚本来进行一些构建自动化。我发现 here echo $? 根据前面的语句返回真或假。我刚刚发现 echo 是 Write-Output 的别名。 写主机 $?
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 4年前关闭。 Improve thi
我将一个工作 View Controller 类从另一个项目复制到一个新项目中。我无法在新项目中加载 View 。在旧项目中我使用了presentModalViewController。在新版本中,我
我对 javascript 很陌生,所以很难看出我哪里出错了。由于某种原因,我的功能无法正常工作。任何帮助,将不胜感激。我尝试在外部 js 文件、头部/主体中使用它们,但似乎没有任何效果。错误要么出在
我正在尝试学习Flutter中的复选框。 问题是,当我想在Scaffold(body :)中使用复选框时,它正在工作。但我想在不同的地方使用它,例如ListView中的项目。 return Cente
我们当前使用的是 sleuth 2.2.3.RELEASE,我们看不到在 http header 中传递的 userId 字段没有传播。下面是我们的代码。 BaggageField REQUEST_I
我有一个组合框,其中包含一个项目,比如“a”。我想调用该组合框的 Action 监听器,仅在手动选择项目“a”完成时才调用。我也尝试过 ItemStateChanged,但它的工作原理与 Action
你能看一下照片吗?现在,一步前我执行了 this.interrupt()。您可以看到 this.isInterrupted() 为 false。我仔细观察——“这个”没有改变。它具有相同的 ID (1
我们当前使用的是 sleuth 2.2.3.RELEASE,我们看不到在 http header 中传递的 userId 字段没有传播。下面是我们的代码。 BaggageField REQUEST_I
我正在尝试在我的网站上设置一个联系表单,当有人点击发送时,就会运行一个作业,并在该作业中向所有管理员用户发送通知。不过,我在失败的工作表中不断收到此错误: Illuminate\Database\El
我是一名优秀的程序员,十分优秀!