Click here to Skip to main content
15,886,693 members
Home / Discussions / C#
   

C#

 
AnswerRe: make exe file Pin
Pete O'Hanlon11-Sep-09 4:13
mvePete O'Hanlon11-Sep-09 4:13 
NewsRe: make exe file Pin
ali_reza_zareian11-Sep-09 9:13
ali_reza_zareian11-Sep-09 9:13 
AnswerRe: make exe file Pin
stancrm11-Sep-09 4:13
stancrm11-Sep-09 4:13 
AnswerRe: make exe file Pin
PIEBALDconsult11-Sep-09 4:15
mvePIEBALDconsult11-Sep-09 4:15 
QuestionSetting private fields of nested classes using reflection Pin
BRShroyer11-Sep-09 3:39
BRShroyer11-Sep-09 3:39 
AnswerRe: Setting private fields of nested classes using reflection Pin
PIEBALDconsult11-Sep-09 4:26
mvePIEBALDconsult11-Sep-09 4:26 
QuestionRemoving shim and placing VSTO. Pin
SRKSHOME11-Sep-09 3:38
SRKSHOME11-Sep-09 3:38 
QuestionFTPS SSL/TLS Issue on Some Computers Pin
SimpleData11-Sep-09 2:28
SimpleData11-Sep-09 2:28 
Hi I am using this code to upload a file to my server but on some computers like 1% of users it doesn't upload the file to the server. After trying to connect on that PC which has the problem, with Filezilla to my server I see that it fails to make the connection because it can't pass the SSL/TLS authentication part.

public static void Upload(string strLocalFileName,string strRemoteFileName, string strUsername, string strPassword)
        {
                WebRequest wreq = WebRequest.Create(HTTPloc.fileserverurl + strRemoteFileName);
                FtpWebRequest ftp = (FtpWebRequest)wreq;

                // This returns true always because my certificate is not signed, it is self-generated
                ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;

                ftp.Credentials = new NetworkCredential(strUsername, strPassword);

                ftp.Method = WebRequestMethods.Ftp.UploadFile;

                ftp.UsePassive = true;
                ftp.UseBinary = true;
                ftp.KeepAlive = false;
                ftp.EnableSsl = true;

                FileStream stream = File.OpenRead(strLocalFileName);
                byte[] buffer = new byte[stream.Length];

                stream.Read(buffer, 0, buffer.Length);
                stream.Close();

                Stream reqStream = ftp.GetRequestStream();
                reqStream.Write(buffer, 0, buffer.Length);
                reqStream.Close();
        }


The exception it throws is something like "remote computer didn't answer in the time provided" actually it defines timeout.

User tried OS reinstall but still the same problem. It has to be a problem with the things he does after installation. Any ideas? What causes a problem on SSL TLS authentication?

Thanks.
QuestionC# Background Worker losing variable value in Progress Pin
Wheels01211-Sep-09 2:15
Wheels01211-Sep-09 2:15 
AnswerRe: C# Background Worker losing variable value in Progress Pin
DaveyM6911-Sep-09 2:56
professionalDaveyM6911-Sep-09 2:56 
GeneralRe: C# Background Worker losing variable value in Progress Pin
Wheels01211-Sep-09 3:48
Wheels01211-Sep-09 3:48 
GeneralRe: C# Background Worker losing variable value in Progress Pin
DaveyM6911-Sep-09 4:14
professionalDaveyM6911-Sep-09 4:14 
AnswerRe: C# Background Worker losing variable value in Progress Pin
Alan N11-Sep-09 2:56
Alan N11-Sep-09 2:56 
AnswerRe: C# Background Worker losing variable value in Progress Pin
DaveyM6911-Sep-09 3:10
professionalDaveyM6911-Sep-09 3:10 
QuestionDBNull error Pin
kanchoette11-Sep-09 1:38
kanchoette11-Sep-09 1:38 
AnswerRe: DBNull error Pin
monstale11-Sep-09 2:22
monstale11-Sep-09 2:22 
AnswerRe: DBNull error Pin
J4amieC11-Sep-09 2:22
J4amieC11-Sep-09 2:22 
AnswerRe: DBNull error Pin
PIEBALDconsult11-Sep-09 4:28
mvePIEBALDconsult11-Sep-09 4:28 
QuestionHow do I read in a h246 .mp4 file and change some hex in the file and then save the file back out? Pin
thestonefox11-Sep-09 1:05
thestonefox11-Sep-09 1:05 
AnswerRe: How do I read in a h246 .mp4 file and change some hex in the file and then save the file back out? Pin
stancrm11-Sep-09 1:22
stancrm11-Sep-09 1:22 
QuestionC# Excel. Find a specific cell and write in string data into the cell to the right of the found cell. [modified] Pin
gjx_junxian198911-Sep-09 0:16
gjx_junxian198911-Sep-09 0:16 
QuestionWMI Pin
moein.serpico10-Sep-09 23:57
moein.serpico10-Sep-09 23:57 
AnswerRe: WMI Pin
dan!sh 11-Sep-09 0:19
professional dan!sh 11-Sep-09 0:19 
AnswerRe: WMI Pin
moein.serpico11-Sep-09 0:29
moein.serpico11-Sep-09 0:29 
GeneralRe: WMI Pin
Henry Minute11-Sep-09 0:34
Henry Minute11-Sep-09 0:34 

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.