locked
The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

    Question

  •  

    Hi,

    I am getting the error:

    "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)." when i try to upload file using FTPWebRequest api.

    the error is comming while executing the call:

    GetRequestStream()

    I tryed all possible ways to resolve the issue but no luck. I can acces the ftp server and create files using browser.

     

    Any idea on what is happining? please note that I ahve gone through the articles mentioned in MS web site. Even the MS samples are not working. I am using Windows xp system.

     

    I took the sample from: http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx

    even that one is not working. failing while executing the call:GetRequestStream()

     

    Thanks in Advance,

    Venkat

    Thursday, April 17, 2008 9:14 AM

Answers

  • Well the problem is still at the server as far as I can see.  So I'd speak to its adminstrator to find out why it is allow a write.  The log shows that FtpWebRequest is doing as you ask: CD-ing to the correct folder and then doing the upload.

    Tuesday, April 22, 2008 1:11 PM

All replies

  • The server is telling you that something's wrong...  When you do the upload manually, I presume you do something like "cd foo, put file.txt" etc.  Do you have to do "cd /foo"?  If so see http://blogs.msdn.com/mariya/archive/2006/03/06/544523.aspx in brief add %2F at the front of the file part of the URL to signify the change to the root directory.

     

    If not, let us know the sequence of commands you have to do manually.

    Thursday, April 17, 2008 7:08 PM
  • Hello,

    I am using the .NET FTPWebReqyest api. as I meantioned in previous post, i tried MSDN samples also, it also fails.

     

    I am attaching code i am using here:

     

    private void Upload(string filename)
            {
                FileInfo fileInf = new FileInfo(filename);
                string uri = "ftp://" + ftpServerIP + "/" + fileInf.Name;
              
         FtpWebRequest reqFTP;
                Uri target = new Uri(uri);

               
                // Create FtpWebRequest object from the Uri provided
                //reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + fileInf.Name));

                reqFTP = (FtpWebRequest)FtpWebRequest.Create(target);

                // Provide the WebPermission Credintials
                //reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);

                reqFTP.Proxy = FtpWebRequest.GetSystemWebProxy();
                reqFTP.Proxy.Credentials = new NetworkCredential("MyId", "MyPassword", "Mydomain");
                reqFTP.Credentials = new NetworkCredential("MyId", "MyPassword", "Mydomain");

                // By default KeepAlive is true, where the control connection is not closed
                // after a command is executed.
                reqFTP.KeepAlive = false;

                // Specify the command to be executed.
                reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
               
                // Specify the data transfer type.
                reqFTP.UseBinary = true;

                // Notify the server about the size of the uploaded file
                reqFTP.ContentLength = fileInf.Length;

                // The buffer size is set to 1kb
                int buffLength = 1024;
                byte[] buff = new byte[buffLength];
                int contentLen;

                // Opens a file stream (System.IO.FileStream) to read the file to be uploaded
                FileStream fs = fileInf.OpenRead();
              
                try
                {
                
                    // Stream to which the file to be upload is written
                    Stream strm = reqFTP.GetRequestStream();
                   
                    // Read from the file stream 2kb at a time
                    contentLen = fs.Read(buff, 0, buffLength);

                    // Till Stream content ends
                    while (contentLen != 0)
                    {
                        // Write Content from the file stream to the FTP Upload Stream
                        strm.Write(buff, 0, contentLen);
                        contentLen = fs.Read(buff, 0, buffLength);
                    }

                    // Close the file stream and the Request Stream
                    strm.Close();
                    fs.Close();
                }
                catch(Exception ex)
                {
                    MessageBox.Show(ex.Message, "FTP Upload Error");
                }
            }

     

     

    The function fails at:  Stream strm = reqFTP.GetRequestStream();  please check the sample code, it is nothing special.

     


     

    Friday, April 18, 2008 1:41 AM
  • When you do the upload manually, what sequence of FTP commands do you type to do the upload?

    Friday, April 18, 2008 10:22 AM
  • hi,

    I have not tried using ftp console. I am sending you the trace file generated from the code, this may help you in understanding the problem. Please see the trace file content below:

     

     

    System.Net Verbose: 0 : [1748] WebRequest::Create(ftp://localhost/XSLTKeys.js)
        DateTime=2008-04-21T02:21:32.0988420Z
    System.Net Information: 0 : [1748] FtpWebRequest#16143157::.ctor(ftp://localhost/XSLTKeys.js)
        DateTime=2008-04-21T02:21:32.0988420Z
    System.Net Verbose: 0 : [1748] Exiting WebRequest::Create()  -> FtpWebRequest#16143157
        DateTime=2008-04-21T02:21:32.0988420Z
    System.Net Verbose: 0 : [1748] FtpWebRequest#16143157::GetRequestStream()
        DateTime=2008-04-21T02:21:47.0946904Z
    System.Net Information: 0 : [1748] FtpWebRequest#16143157::GetRequestStream(Method=STOR.)
        DateTime=2008-04-21T02:21:47.0946904Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedocket(InterNetwork#2)
        DateTime=2008-04-21T02:21:47.1882196Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedocket()
        DateTime=2008-04-21T02:21:47.1882196Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Connect(1:21#16777322)
        DateTime=2008-04-21T02:21:47.2038078Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Connect()
        DateTime=2008-04-21T02:21:47.2038078Z
    System.Net Information: 0 : [1748] Associating FtpWebRequest#16143157 with FtpControlStream#7877106
        DateTime=2008-04-21T02:21:47.2038078Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2038078Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2038078Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 32 30 20 4D 69 63 72-6F 73 6F 66 74 20 46 54 : 220 Microsoft FT
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 50 20 53 65 72 76 69 63-65 0D 0A                : P Service..
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 27#27
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [220 Microsoft FTP Service]
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [USER anonymous]
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 55 53 45 52 20 61 6E 6F-6E 79 6D 6F 75 73 0D 0A : USER anonymous..
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 16#16
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2193960Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 33 33 31 20 41 6E 6F 6E-79 6D 6F 75 73 20 61 63 : 331 Anonymous ac
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 63 65 73 73 20 61 6C 6C-6F 77 65 64 2C 20 73 65 : cess allowed, se
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] 00000020 : 6E 64 20 69 64 65 6E 74-69 74 79 20 28 65 2D 6D : nd identity (e-m
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] 00000030 : 61 69 6C 20 6E 61 6D 65-29 20 61 73 20 70 61 73 : ail name) as pas
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] 00000040 : 73 77 6F 72 64 2E 0D 0A-                        : sword...
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 72#72
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [331 Anonymous access allowed, send identity (e-mail name) as password.]
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [PASS ********]
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.2349842Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 50 41 53 53 20 61 6E 6F-6E 79 6D 6F 75 73 40 0D : PASS anonymous@.
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 0A                                              : .
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 17#17
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 33 30 20 41 6E 6F 6E-79 6D 6F 75 73 20 75 73 : 230 Anonymous us
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 65 72 20 6C 6F 67 67 65-64 20 69 6E 2E 0D 0A    : er logged in...
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 31#31
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [230 Anonymous user logged in.]
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [OPTS utf8 on]
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.2505724Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 4F 50 54 53 20 75 74 66-38 20 6F 6E 0D 0A       : OPTS utf8 on..
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 14#14
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 35 30 30 20 27 4F 50 54-53 20 75 74 66 38 20 6F : 500 'OPTS utf8 o
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 6E 27 3A 20 63 6F 6D 6D-61 6E 64 20 6E 6F 74 20 : n': command not
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] 00000020 : 75 6E 64 65 72 73 74 6F-6F 64 0D 0A             : understood..
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 44#44
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [500 'OPTS utf8 on': command not understood]
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [PWD]
        DateTime=2008-04-21T02:21:47.2661606Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 50 57 44 0D 0A                                  : PWD..
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 5#5
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 35 37 20 22 2F 22 20-69 73 20 63 75 72 72 65 : 257 "/" is curre
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 6E 74 20 64 69 72 65 63-74 6F 72 79 2E 0D 0A    : nt directory...
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 31#31
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [257 "/" is current directory.]
        DateTime=2008-04-21T02:21:47.2817488Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [CWD /]
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 43 57 44 20 2F 0D 0A                            : CWD /..
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 7#7
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 35 30 20 43 57 44 20-63 6F 6D 6D 61 6E 64 20 : 250 CWD command
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 73 75 63 63 65 73 73 66-75 6C 2E 0D 0A          : successful...
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 29#29
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [250 CWD command successful.]
        DateTime=2008-04-21T02:21:47.2973370Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [TYPE I]
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 54 59 50 45 20 49 0D 0A-                        : TYPE I..
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 8#8
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 30 30 20 54 79 70 65-20 73 65 74 20 74 6F 20 : 200 Type set to
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 49 2E 0D 0A                                     : I...
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 20#20
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [200 Type set to I.]
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [PASV]
        DateTime=2008-04-21T02:21:47.3129252Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 50 41 53 56 0D 0A                               : PASV..
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 6#6
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 32 32 37 20 45 6E 74 65-72 69 6E 67 20 50 61 73 : 227 Entering Pas
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 73 69 76 65 20 4D 6F 64-65 20 28 31 32 37 2C 30 : sive Mode (127,0
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] 00000020 : 2C 30 2C 31 2C 37 2C 31-32 38 29 2E 0D 0A       : ,0,1,7,128)...
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 46#46
        DateTime=2008-04-21T02:21:47.3285134Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [227 Entering Passive Mode (127,0,0,1,7,128).]
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#18925492:Tongue Tiedocket(InterNetwork#2)
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#18925492:Tongue Tiedocket()
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#18925492::Connect(1:1920#16779263)
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#18925492::Connect()
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Sending command [STOR XSLTKeys.js]
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Tongue Tiedend()
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446:Tongue Tiedend
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 53 54 4F 52 20 58 53 4C-54 4B 65 79 73 2E 6A 73 : STOR XSLTKeys.js
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 0D 0A                                           : ..
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446:Tongue Tiedend()  -> 18#18
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446::Receive()
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Data from Socket#55353446::Receive
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] 00000000 : 35 35 30 20 58 53 4C 54-4B 65 79 73 2E 6A 73 3A : 550 XSLTKeys.js:
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] 00000010 : 20 41 63 63 65 73 73 20-69 73 20 64 65 6E 69 65 :  Access is denie
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] 00000020 : 64 2E 20 0D 0A                                  : d. ..
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Exiting Socket#55353446::Receive()  -> 37#37
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net Information: 0 : [1748] FtpControlStream#7877106 - Received response [550 XSLTKeys.js: Access is denied. ]
        DateTime=2008-04-21T02:21:47.3441016Z
    System.Net.Sockets Verbose: 0 : [1748] Socket#55353446:Big Smileispose()
        DateTime=2008-04-21T02:21:47.3596898Z
    System.Net Information: 0 : [1748] FtpWebRequest#16143157:SadReleasing FTP connection#7877106.)
        DateTime=2008-04-21T02:21:47.3752780Z
    System.Net Error: 0 : [1748] Exception in the FtpWebRequest#16143157::GetRequestStream - The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
        DateTime=2008-04-21T02:21:47.3752780Z
    System.Net Error: 0 : [1748]    at System.Net.FtpWebRequest.SyncRequestCallback(Object obj)
       at System.Net.FtpWebRequest.RequestCallback(Object obj)
       at System.Net.CommandStream.Abort(Exception e)
       at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage)
       at System.Net.FtpWebRequest.GetRequestStream()
        DateTime=2008-04-21T02:21:47.3752780Z
    System.Net Verbose: 0 : [1748] Exiting FtpWebRequest#16143157::GetRequestStream()
        DateTime=2008-04-21T02:21:47.3908662Z

    Regards,

    Venkat

    Monday, April 21, 2008 2:24 AM
  • Good idea.  Now, do you really need help with this?! :-)

     

          550 XSLTKeys.js: Access is denied.

     

    says the server!

     

    Its current directory is /  Do you want to write to its root directory?

     

    Or, does the user you are logging on as have write permissions?  You are logging on as "anonymous", he never normally has write permissions!

    Monday, April 21, 2008 8:46 AM
  • Thanks for the reply.

    Actually, I am loggining in with my account, for sending trace file to you purpose i used the "anonymous" user account.

     

    Irrespective of my login ( in the trace it will show my user name and password) or "anonymous" user login, it is giving same error message. I am having admin rights. I have gone through the trace log, and i don't understand why it is saying access denied.

     

    Why it is going to root directrory? I have given the ftp path to create the file, why it does still go to root directory?

     

    yes I really need help as it is giving access dined for me, who is having admin rights to system.

     

    Regards,

    Venkat

    Monday, April 21, 2008 10:48 AM
  • I don't see a pathname being given to the FtpWebRequest class. ;-)

    Code Snippet

    FileInfo fileInf = new FileInfo(filename);
    string uri = "ftp://" + ftpServerIP + "/" + fileInf.Name;
              
    FtpWebRequest reqFTP;
    Uri target = new Uri(uri);

    //

    Console.WriteLine(uri);

    Console.WriteLine(target);

     

     

    In fact, from the first line of the log:

               System.Net Verbose: 0 : [1748] WebRequest::Create(ftp://localhost/XSLTKeys.js)

    Monday, April 21, 2008 12:11 PM
  • Alan,

    the ftpServerIP includes the path name. for example in my case the value of ftpServerIP varaible is:

    localhost/TASFTPSharedData

     

    So the value of uri varaible = ftp://localhost/TASFTPSharedData/XSLTKeys.js

     

    I did not understand why the log file showing the pat as different (May be i have not given path correctly when i generated the log file for you, however the error remain same whatever I do). Now i again generated the log file with correct path, it still gives same error. please find the log file below: Looks like it is not a simple issue.

     

    System.Net Verbose: 0 : [0812] WebRequest::Create(ftp://localhost/TASFTPSharedData/XSLTKeys.js)
        DateTime=2008-04-22T03:14:01.6858291Z
    System.Net Information: 0 : [0812] FtpWebRequest#19386821::.ctor(ftp://localhost/TASFTPSharedData/XSLTKeys.js)
        DateTime=2008-04-22T03:14:01.7483087Z
    System.Net Verbose: 0 : [0812] Exiting WebRequest::Create()  -> FtpWebRequest#19386821
        DateTime=2008-04-22T03:14:01.7483087Z
    System.Net Verbose: 0 : [0812] FtpWebRequest#19386821::GetRequestStream()
        DateTime=2008-04-22T03:14:31.8790958Z
    System.Net Information: 0 : [0812] FtpWebRequest#19386821::GetRequestStream(Method=STOR.)
        DateTime=2008-04-22T03:14:31.9103356Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedocket(InterNetwork#2)
        DateTime=2008-04-22T03:14:32.0196749Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedocket()
        DateTime=2008-04-22T03:14:32.0196749Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Connect(1:21#16777322)
        DateTime=2008-04-22T03:14:32.0509147Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Connect()
        DateTime=2008-04-22T03:14:32.0509147Z
    System.Net Information: 0 : [0812] Associating FtpWebRequest#19386821 with FtpControlStream#66736487
        DateTime=2008-04-22T03:14:32.0509147Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 32 30 20 4D 69 63 72-6F 73 6F 66 74 20 46 54 : 220 Microsoft FT
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 50 20 53 65 72 76 69 63-65 0D 0A                : P Service..
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 27#27
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [220 Microsoft FTP Service]
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [USER anonymous]
        DateTime=2008-04-22T03:14:32.0665346Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 55 53 45 52 20 61 6E 6F-6E 79 6D 6F 75 73 0D 0A : USER anonymous..
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 16#16
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 33 33 31 20 41 6E 6F 6E-79 6D 6F 75 73 20 61 63 : 331 Anonymous ac
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 63 65 73 73 20 61 6C 6C-6F 77 65 64 2C 20 73 65 : cess allowed, se
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000020 : 6E 64 20 69 64 65 6E 74-69 74 79 20 28 65 2D 6D : nd identity (e-m
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000030 : 61 69 6C 20 6E 61 6D 65-29 20 61 73 20 70 61 73 : ail name) as pas
        DateTime=2008-04-22T03:14:32.0821545Z
    System.Net.Sockets Verbose: 0 : [0812] 00000040 : 73 77 6F 72 64 2E 0D 0A-                        : sword...
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 72#72
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [331 Anonymous access allowed, send identity (e-mail name) as password.]
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [PASS ********]
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 50 41 53 53 20 61 6E 6F-6E 79 6D 6F 75 73 40 0D : PASS anonymous@.
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 0A                                              : .
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 17#17
        DateTime=2008-04-22T03:14:32.0977744Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 33 30 20 41 6E 6F 6E-79 6D 6F 75 73 20 75 73 : 230 Anonymous us
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 65 72 20 6C 6F 67 67 65-64 20 69 6E 2E 0D 0A    : er logged in...
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 31#31
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [230 Anonymous user logged in.]
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [OPTS utf8 on]
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 4F 50 54 53 20 75 74 66-38 20 6F 6E 0D 0A       : OPTS utf8 on..
        DateTime=2008-04-22T03:14:32.1133943Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 14#14
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 35 30 30 20 27 4F 50 54-53 20 75 74 66 38 20 6F : 500 'OPTS utf8 o
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 6E 27 3A 20 63 6F 6D 6D-61 6E 64 20 6E 6F 74 20 : n': command not
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] 00000020 : 75 6E 64 65 72 73 74 6F-6F 64 0D 0A             : understood..
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 44#44
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [500 'OPTS utf8 on': command not understood]
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [PWD]
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.1290142Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 50 57 44 0D 0A                                  : PWD..
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 5#5
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 35 37 20 22 2F 22 20-69 73 20 63 75 72 72 65 : 257 "/" is curre
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 6E 74 20 64 69 72 65 63-74 6F 72 79 2E 0D 0A    : nt directory...
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 31#31
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [257 "/" is current directory.]
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [CWD /TASFTPSharedData/]
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.1446341Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 43 57 44 20 2F 54 41 53-46 54 50 53 68 61 72 65 : CWD /TASFTPShare
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 64 44 61 74 61 2F 0D 0A-                        : dData/..
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 24#24
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 35 30 20 43 57 44 20-63 6F 6D 6D 61 6E 64 20 : 250 CWD command
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 73 75 63 63 65 73 73 66-75 6C 2E 0D 0A          : successful...
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 29#29
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [250 CWD command successful.]
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [TYPE I]
        DateTime=2008-04-22T03:14:32.1602540Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 54 59 50 45 20 49 0D 0A-                        : TYPE I..
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 8#8
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 30 30 20 54 79 70 65-20 73 65 74 20 74 6F 20 : 200 Type set to
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 49 2E 0D 0A                                     : I...
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 20#20
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [200 Type set to I.]
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [PASV]
        DateTime=2008-04-22T03:14:32.1758739Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 50 41 53 56 0D 0A                               : PASV..
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 6#6
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 32 32 37 20 45 6E 74 65-72 69 6E 67 20 50 61 73 : 227 Entering Pas
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 73 69 76 65 20 4D 6F 64-65 20 28 31 32 37 2C 30 : sive Mode (127,0
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] 00000020 : 2C 30 2C 31 2C 31 38 2C-31 32 34 29 2E 0D 0A    : ,0,1,18,124)...
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 47#47
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [227 Entering Passive Mode (127,0,0,1,18,124).]
        DateTime=2008-04-22T03:14:32.1914938Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#50351926:Tongue Tiedocket(InterNetwork#2)
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#50351926:Tongue Tiedocket()
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#50351926::Connect(1:4732#16781827)
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#50351926::Connect()
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Sending command [STOR XSLTKeys.js]
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Tongue Tiedend()
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588:Tongue Tiedend
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 53 54 4F 52 20 58 53 4C-54 4B 65 79 73 2E 6A 73 : STOR XSLTKeys.js
        DateTime=2008-04-22T03:14:32.2071137Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 0D 0A                                           : ..
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588:Tongue Tiedend()  -> 18#18
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588::Receive()
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] Data from Socket#67100588::Receive
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] 00000000 : 35 35 30 20 58 53 4C 54-4B 65 79 73 2E 6A 73 3A : 550 XSLTKeys.js:
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] 00000010 : 20 41 63 63 65 73 73 20-69 73 20 64 65 6E 69 65 :  Access is denie
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] 00000020 : 64 2E 20 0D 0A                                  : d. ..
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net.Sockets Verbose: 0 : [0812] Exiting Socket#67100588::Receive()  -> 37#37
        DateTime=2008-04-22T03:14:32.2227336Z
    System.Net Information: 0 : [0812] FtpControlStream#66736487 - Received response [550 XSLTKeys.js: Access is denied. ]
        DateTime=2008-04-22T03:14:32.2383535Z
    System.Net.Sockets Verbose: 0 : [0812] Socket#67100588:Big Smileispose()
        DateTime=2008-04-22T03:14:32.3476928Z
    System.Net Information: 0 : [0812] FtpWebRequest#19386821:SadReleasing FTP connection#66736487.)
        DateTime=2008-04-22T03:14:32.3476928Z
    System.Net Error: 0 : [0812] Exception in the FtpWebRequest#19386821::GetRequestStream - The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
        DateTime=2008-04-22T03:14:32.3476928Z
    System.Net Error: 0 : [0812]    at System.Net.FtpWebRequest.SyncRequestCallback(Object obj)
       at System.Net.FtpWebRequest.RequestCallback(Object obj)
       at System.Net.CommandStream.Abort(Exception e)
       at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage)
       at System.Net.FtpWebRequest.GetRequestStream()
        DateTime=2008-04-22T03:14:32.4414122Z
    System.Net Verbose: 0 : [0812] Exiting FtpWebRequest#19386821::GetRequestStream()
        DateTime=2008-04-22T03:14:32.4414122Z
    System.Net.Sockets Verbose: 0 : [5492] Socket#50351926:Big Smileispose()
        DateTime=2008-04-22T03:16:31.6524890Z

     

    Tuesday, April 22, 2008 3:20 AM
  • Well the problem is still at the server as far as I can see.  So I'd speak to its adminstrator to find out why it is allow a write.  The log shows that FtpWebRequest is doing as you ask: CD-ing to the correct folder and then doing the upload.

    Tuesday, April 22, 2008 1:11 PM
  • Alan,

    ok, probably i will try this on different server. i am trying this on windows xp system, where i ahev the FTP service running.

     

    Thanks you,

    Venkat

     

    Friday, April 25, 2008 9:26 AM