Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>UploadFile uses STOR command, but before this command is sent, .NET sometimes send other commands such as "OPTS utf8 on" or "TYPE I", etc. If you create configuration file for your application with following content:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.diagnostics&gt; &lt;sharedListeners&gt; &lt;add name="console" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\logfile.txt" /&gt; &lt;/sharedListeners&gt; &lt;sources&gt; &lt;source name="System.Net" switchName="sourceSwitch"&gt; &lt;listeners&gt; &lt;add name="console" /&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;/sources&gt; &lt;switches&gt; &lt;add name="sourceSwitch" value="Verbose"/&gt; &lt;/switches&gt; &lt;/system.diagnostics&gt; &lt;/configuration&gt; </code></pre> <p>all commands and responses will be logged in file, so you can look, which one causes the problem.</p> <p><strong>UPDATE:</strong> So the problem is, that before STOR command is issued, FTP client sends OPTS and PWD commands, which your printer doesn't understand, probably because it is very lightweight FTP server. Unfortunately I don't know how to prevent these commands to be send. I have only 2 workarounds on my mind:</p> <ul> <li>find some third-party FTP library, that doesn't send those problematic commands.</li> <li>since uploading files from command line works, create file (commands.txt) with appropriate 'put' command and then start FTP transfer from your program like this:</li> </ul> <p><code>Process.Start("ftp", "-A -s:commands.txt " + printer.m_IPAddress);</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload