Click here to Skip to main content
16,007,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: urgent help needed Pin
DigiOz Multimedia26-Sep-07 19:41
DigiOz Multimedia26-Sep-07 19:41 
GeneralRe: urgent help needed Pin
kashif200726-Sep-07 21:18
kashif200726-Sep-07 21:18 
GeneralRe: urgent help needed Pin
DigiOz Multimedia27-Sep-07 4:20
DigiOz Multimedia27-Sep-07 4:20 
QuestionServer Error in '/' Application. Pin
IamAmit26-Sep-07 19:18
IamAmit26-Sep-07 19:18 
AnswerRe: Server Error in '/' Application. Pin
Guffa26-Sep-07 20:07
Guffa26-Sep-07 20:07 
GeneralRe: Server Error in '/' Application. Pin
IamAmit26-Sep-07 20:10
IamAmit26-Sep-07 20:10 
QuestionWizard control Pin
kjosh26-Sep-07 18:00
kjosh26-Sep-07 18:00 
Questiondownload logfile from an ftp server using ftpwebrequest Pin
Mack Ait-Aoudia26-Sep-07 12:42
Mack Ait-Aoudia26-Sep-07 12:42 
Hello everybody,

I'm facing a weird problem in my asp.net 2.0 website using the ftpwebrequest class. I want to donwdload the logfile from an ftpserver and I get the following error:
"the remote server returned an error:(530) Not Logged In"

this is my code:
<br />
  protected void btnTestLF_Click(object sender, EventArgs e) {<br />
        Uri ur = new Uri("ftp://ftp.mydomaine.com/");<br />
        Downloadlf(ur, "myname", "mypwd");<br />
  }<br />
    <br />
    <br />
    <br />
 private string Downloadlf(Uri serverUri, string name, string pwd) {<br />
<br />
    // The serverUri parameter should start with the ftp:// scheme.<br />
    if (serverUri.Scheme != Uri.UriSchemeFtp) {<br />
        return string.Empty; <br />
     }<br />
     // Get the object used to communicate with the server.<br />
     WebClient request = new WebClient();<br />
     request.Credentials = new NetworkCredential(name, pwd, serverUri.AbsoluteUri); <br />
  <br />
  try {//the next line is the problem:<br />
        <br />
          byte[] newFileData = request.DownloadData(serverUri.ToString());<br />
       <br />
      /*I tried also the following: <br />
      byte[] newFileData = request.DownloadData(serverUri.DnsSafeHost);<br />
      byte[] newFileData = request.DownloadData(serverUri.AbsoluteUri);<br />
      byte[] newFileData = request.DownloadData(serverUri.AbsolutePath);<br />
     the problem still the same<br />
      */<br />
      string fileString = System.Text.Encoding.UTF8.GetString(newFileData);<br />
            <br />
  }<br />
  catch (WebException e){<br />
       //call the ErrorManagement class to store the error in the database<br />
<br />
  }<br />
        return string.Empty;<br />
 }<br />


Could anyone give me some help! I'll appreciate it very much!

Just Relax And Keep It Simple.

AnswerRe: download logfile from an ftp server using ftpwebrequest Pin
DigiOz Multimedia26-Sep-07 19:46
DigiOz Multimedia26-Sep-07 19:46 
QuestionJavascript : Textbox Disable Pin
ss.mmm26-Sep-07 10:13
ss.mmm26-Sep-07 10:13 
AnswerRe: Javascript : Textbox Disable Pin
Guffa26-Sep-07 10:32
Guffa26-Sep-07 10:32 
GeneralRe: Javascript : Textbox Disable Pin
ss.mmm26-Sep-07 10:48
ss.mmm26-Sep-07 10:48 
GeneralRe: Javascript : Textbox Disable Pin
ss.mmm26-Sep-07 11:22
ss.mmm26-Sep-07 11:22 
GeneralRe: Javascript : Textbox Disable Pin
Mack Ait-Aoudia26-Sep-07 12:53
Mack Ait-Aoudia26-Sep-07 12:53 
QuestionWeb Solution Organization Pin
gus_br26-Sep-07 9:33
gus_br26-Sep-07 9:33 
QuestionCode acceptance criteria for support Pin
Sarma Pisapati26-Sep-07 8:41
Sarma Pisapati26-Sep-07 8:41 
AnswerRe: Code acceptance criteria for support Pin
Christian Graus26-Sep-07 13:59
protectorChristian Graus26-Sep-07 13:59 
QuestionSecurity Exception when Deploying Web Application [modified] Pin
zz_scarab26-Sep-07 8:14
zz_scarab26-Sep-07 8:14 
QuestionWebsite search function Pin
dptalt26-Sep-07 7:19
dptalt26-Sep-07 7:19 
QuestionInsert form values into mssql 2000 server? Pin
Shahriat Hossain26-Sep-07 6:02
Shahriat Hossain26-Sep-07 6:02 
AnswerRe: Insert form values into mssql 2000 server? Pin
ss.mmm26-Sep-07 6:04
ss.mmm26-Sep-07 6:04 
QuestionTextBox_Textchanged?? Pin
ss.mmm26-Sep-07 5:47
ss.mmm26-Sep-07 5:47 
AnswerRe: TextBox_Textchanged?? Pin
kubben26-Sep-07 7:39
kubben26-Sep-07 7:39 
GeneralRe: TextBox_Textchanged?? Pin
ss.mmm26-Sep-07 7:46
ss.mmm26-Sep-07 7:46 
QuestionHow can I create a Silver javascript scrollbar. Pin
thomasa26-Sep-07 5:01
thomasa26-Sep-07 5:01 

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.