Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: Windows 7 C# and biometric API Pin
Manfred Rudolf Bihy1-Apr-15 22:38
professionalManfred Rudolf Bihy1-Apr-15 22:38 
AnswerRe: Windows 7 C# and biometric API Pin
Eddy Vluggen1-Apr-15 9:34
professionalEddy Vluggen1-Apr-15 9:34 
QuestionHow to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Amatuer Developer1-Apr-15 0:23
Amatuer Developer1-Apr-15 0:23 
AnswerRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Pete O'Hanlon1-Apr-15 3:37
mvePete O'Hanlon1-Apr-15 3:37 
GeneralRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Amatuer Developer1-Apr-15 4:40
Amatuer Developer1-Apr-15 4:40 
GeneralRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Pete O'Hanlon1-Apr-15 4:42
mvePete O'Hanlon1-Apr-15 4:42 
AnswerRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Brisingr Aerowing1-Apr-15 11:26
professionalBrisingr Aerowing1-Apr-15 11:26 
QuestionFTP Upload in SAP B1 -Time out Error Pin
Rajeev M Kartha31-Mar-15 23:04
Rajeev M Kartha31-Mar-15 23:04 
Hello Friends,

My task is to upload a CSV file into a specified FTP loacation.But the system is throwing time out message from a line of the code. Please help me out on this issue.

Below is the code i use.

public static string UploadFile(string ftpUrl, string userName, string password, string uploadFTPDirectory, string localFilePath)
{
string PureFileName = new FileInfo(localFilePath).Name;
String uploadUrl = String.Format("{0}{1}/{2}", ftpUrl, uploadFTPDirectory, PureFileName);
//String uploadUrl = String.Format("{0}{1}", ftpUrl, uploadFTPDirectory);
FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(uploadUrl);
ftpRequest.Proxy =null;
    ftpRequest.Method = WebRequestMethods.Ftp.UploadFile;
    ftpRequest.Credentials = new NetworkCredential(userName, password);
    ftpRequest.UseBinary = true;
    ftpRequest.UsePassive = false;
    try
    {
        byte[] fileData = File.ReadAllBytes(localFilePath);
        ftpRequest.ContentLength = fileData.Length;

        using (Stream fileStream = ftpRequest.GetRequestStream())
        {
            fileStream.Write(fileData, 0, fileData.Length);
            fileStream.Close();
        }

        using (FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse())----------'Sytem throws the Timed out Message here.'
        {
            return ftpResponse.StatusDescription;
        }
    }
    catch(WebException e)
    {
       string s = ((FtpWebResponse)e.Response).StatusDescription;
       return s;
    }
}

AnswerRe: FTP Upload in SAP B1 -Time out Error Pin
Simon_Whale31-Mar-15 23:23
Simon_Whale31-Mar-15 23:23 
GeneralRe: FTP Upload in SAP B1 -Time out Error Pin
Rajeev M Kartha31-Mar-15 23:36
Rajeev M Kartha31-Mar-15 23:36 
QuestionPOPUP box Pin
Member 1156476731-Mar-15 22:34
Member 1156476731-Mar-15 22:34 
AnswerRe: POPUP box Pin
OriginalGriff31-Mar-15 22:40
mveOriginalGriff31-Mar-15 22:40 
AnswerRe: POPUP box Pin
Richard MacCutchan31-Mar-15 22:41
mveRichard MacCutchan31-Mar-15 22:41 
QuestionHow to load different aspx web page based on browser? Pin
RagsGangwar31-Mar-15 6:14
RagsGangwar31-Mar-15 6:14 
AnswerRe: How to load different aspx web page based on browser? Pin
walterhevedeich31-Mar-15 7:04
professionalwalterhevedeich31-Mar-15 7:04 
QuestionSimultaneous File Access Causing App Freeze Pin
MadDashCoder31-Mar-15 4:06
MadDashCoder31-Mar-15 4:06 
AnswerRe: Simultaneous File Access Causing App Freeze Pin
Dave Kreskowiak31-Mar-15 5:11
mveDave Kreskowiak31-Mar-15 5:11 
GeneralRe: Simultaneous File Access Causing App Freeze Pin
MadDashCoder31-Mar-15 5:49
MadDashCoder31-Mar-15 5:49 
GeneralRe: Simultaneous File Access Causing App Freeze Pin
Pete O'Hanlon31-Mar-15 6:03
mvePete O'Hanlon31-Mar-15 6:03 
GeneralRe: Simultaneous File Access Causing App Freeze Pin
Eddy Vluggen31-Mar-15 7:29
professionalEddy Vluggen31-Mar-15 7:29 
Questiontrying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 3:51
Member 1157009831-Mar-15 3:51 
AnswerRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 4:29
mveOriginalGriff31-Mar-15 4:29 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 4:32
Member 1157009831-Mar-15 4:32 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 4:37
Member 1157009831-Mar-15 4:37 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 4:47
mveOriginalGriff31-Mar-15 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.