我创建了一个小的Windows窗体应用程序,将文件上传到我们客户端的ftp站点之一.但我遇到的问题是,当我在本地计算机上运行此应用程序时,它会成功上传文件.但是,如果我在我们的服务器上运行此程序,我会收到此错误消息;
远程服务器返回错误:(550)文件不可用(例如,找不到文件,无法访问该文件),在此行'objFTPRequest.GetRequestStream();'.
有人知道为什么吗?我需要配置防火墙吗?这是我的代码;
FileInfo objFile = new FileInfo(filename);
FtpWebRequest objFTPRequest;
// Create FtpWebRequest object
objFTPRequest = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/outbox/" + objFile.Name));
// Set Credintials
objFTPRequest.Credentials = new NetworkCredential(ftpUserName, ftpPassword);
// By default KeepAlive is true, where the control connection is
// not closed after a command is executed.
objFTPRequest.KeepAlive = false;
// Set the data transfer type.
objFTPRequest.UseBinary = true;
// Set content length
objFTPRequest.ContentLength = objFile.Length;
// Set request method
objFTPRequest.Method = WebRequestMethods.Ftp.UploadFile;
// Set buffer …Run Code Online (Sandbox Code Playgroud) 我有一个名为table的表patient_address,它在patient表中引用了一个PK键.但是,如果我尝试运行以下语句之一:
update patient set id_no='7008255601088' where id_no='8008255601088'
update patient_address set id_no='7008255601088' where id_no='8008255601088'
Run Code Online (Sandbox Code Playgroud)
我收到此错误消息:
"UPDATE语句与REFERENCE约束冲突"FK__patient_a__id_no__27C3E46E".冲突发生在数据库"PMS",表"dbo.patient_address",列'id_no'." 或"UPDATE语句与FOREIGN KEY约束冲突"FK__patient_a__id_no__27C3E46E".冲突发生在数据库"PMS",表"dbo.patient",列'id_no'." .
有没有人知道可能的原因?谢谢.
有人知道如何在C#中以编程方式生成.mht文件,其中包含嵌入的图像吗?事情是我已经意识到.mht文件能够在其中嵌入图像,并且当您更改其位置时,此嵌入图像随整个文件(mht)移动.此文件可以在不同的浏览器上查看,包括IE 6.
我被告知要尝试Data Url Scheme技术.但它无法正常工作,因为它不受其他浏览器的支持.例如IE 6.
有人知道如何在.asmx页面上隐藏公共Web方法吗?我不希望我的客户端查看可用的Web方法.