Click here to Skip to main content
15,903,203 members
Home / Discussions / C#
   

C#

 
QuestionC# select excel file from directory path Pin
classy_dog26-Jun-13 10:56
classy_dog26-Jun-13 10:56 
AnswerRe: C# select excel file from directory path Pin
Ron Beyer26-Jun-13 15:26
professionalRon Beyer26-Jun-13 15:26 
Question2 way events Pin
bfis10813726-Jun-13 8:56
bfis10813726-Jun-13 8:56 
AnswerRe: 2 way events Pin
Ron Beyer26-Jun-13 9:12
professionalRon Beyer26-Jun-13 9:12 
GeneralRe: 2 way events Pin
bfis10813726-Jun-13 10:34
bfis10813726-Jun-13 10:34 
AnswerRe: 2 way events Pin
Dave Kreskowiak26-Jun-13 12:10
mveDave Kreskowiak26-Jun-13 12:10 
GeneralRe: 2 way events Pin
bfis10813726-Jun-13 16:43
bfis10813726-Jun-13 16:43 
QuestionC# obtain db values from app.config of program accessed by a dll Pin
classy_dog26-Jun-13 7:11
classy_dog26-Jun-13 7:11 
AnswerRe: C# obtain db values from app.config of program accessed by a dll Pin
NickPace26-Jun-13 12:07
NickPace26-Jun-13 12:07 
QuestionPassing boolean parameter to an oracle procedure Pin
Subin Mavunkal26-Jun-13 3:39
Subin Mavunkal26-Jun-13 3:39 
AnswerRe: Passing boolean parameter to an oracle procedure Pin
NotPolitcallyCorrect26-Jun-13 3:56
NotPolitcallyCorrect26-Jun-13 3:56 
GeneralRe: Passing boolean parameter to an oracle procedure Pin
Subin Mavunkal26-Jun-13 4:03
Subin Mavunkal26-Jun-13 4:03 
GeneralRe: Passing boolean parameter to an oracle procedure Pin
NotPolitcallyCorrect26-Jun-13 4:05
NotPolitcallyCorrect26-Jun-13 4:05 
GeneralRe: Passing boolean parameter to an oracle procedure Pin
Subin Mavunkal26-Jun-13 4:07
Subin Mavunkal26-Jun-13 4:07 
GeneralRe: Passing boolean parameter to an oracle procedure Pin
NotPolitcallyCorrect26-Jun-13 4:10
NotPolitcallyCorrect26-Jun-13 4:10 
GeneralRe: Passing boolean parameter to an oracle procedure Pin
Subin Mavunkal26-Jun-13 4:36
Subin Mavunkal26-Jun-13 4:36 
AnswerOracle doesn't have a boolean type Pin
Ennis Ray Lynch, Jr.26-Jun-13 6:34
Ennis Ray Lynch, Jr.26-Jun-13 6:34 
QuestionVisual Studio 2010 Database Web Application Pin
Mausam Bharati26-Jun-13 2:17
Mausam Bharati26-Jun-13 2:17 
QuestionHow to Create WCF Rest service in Visual Studio 2012? Pin
Vijay Kanda25-Jun-13 20:55
Vijay Kanda25-Jun-13 20:55 
AnswerRe: How to Create WCF Rest service in Visual Studio 2012? Pin
Richard MacCutchan25-Jun-13 20:57
mveRichard MacCutchan25-Jun-13 20:57 
GeneralRe: How to Create WCF Rest service in Visual Studio 2012? Pin
Vijay Kanda25-Jun-13 22:14
Vijay Kanda25-Jun-13 22:14 
QuestionUpload file using C# Windows service application Pin
susanna.floora25-Jun-13 19:54
susanna.floora25-Jun-13 19:54 
i want to upload a file to ftp server using simple C# widows service application, and this is my code

protected void UploadToFTP(string path, string name)
{

string strLocation = string.Format(ftpfullpath + "/{0}.txt", strNewFtpName);
// FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create("ftp://192.168.10.239/test.txt");
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(strLocation);
ftp.Credentials = new NetworkCredential(strFtpUsername, StrftpPassowrd);
ftp.KeepAlive = true;
ftp.UseBinary = true;
ftp.Method = WebRequestMethods.Ftp.UploadFile;
FileStream fs = File.OpenRead(source);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();

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

when i test this application .txt file is created in FTP server.
But when i run a window service the .txt file is not created(uploaded) on FTP server. How do i solve this??
SuggestionRe: Upload file using C# Windows service application Pin
Richard MacCutchan25-Jun-13 20:56
mveRichard MacCutchan25-Jun-13 20:56 
GeneralRe: Upload file using C# Windows service application Pin
susanna.floora25-Jun-13 21:00
susanna.floora25-Jun-13 21:00 
GeneralRe: Upload file using C# Windows service application Pin
Richard MacCutchan25-Jun-13 21:26
mveRichard MacCutchan25-Jun-13 21:26 

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.