S
saunderl
hello,
I'm trying to send custom commands using the methods object and I am
too dense to figure it out;
FtpWebRequest request =
(FtpWebRequest)WebRequest.Create("ftp://server");
request.Credentials = new NetworkCredential("user", "pwd");
request.Method = "ls";
or CD or any other command I always get this error
System.ArgumentException was unhandled
Message="This method is not supported.\r\nParameter name: value"
Source="System"
ParamName="value"
StackTrace:
at System.Net.FtpWebRequest.set_Method(String value)
at ConsoleTest4.Program.Main(String[] args) in C:\Documents and
Settings\saul01\My Documents\Visual Studio
2005\Projects\ConsoleTests\FtpTest\FtpTest\Class1.cs:line 14
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Just a little bit of help would be appreciated!!!!!!!!!
L. Lee Saunders
I'm trying to send custom commands using the methods object and I am
too dense to figure it out;
FtpWebRequest request =
(FtpWebRequest)WebRequest.Create("ftp://server");
request.Credentials = new NetworkCredential("user", "pwd");
request.Method = "ls";
or CD or any other command I always get this error
System.ArgumentException was unhandled
Message="This method is not supported.\r\nParameter name: value"
Source="System"
ParamName="value"
StackTrace:
at System.Net.FtpWebRequest.set_Method(String value)
at ConsoleTest4.Program.Main(String[] args) in C:\Documents and
Settings\saul01\My Documents\Visual Studio
2005\Projects\ConsoleTests\FtpTest\FtpTest\Class1.cs:line 14
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Just a little bit of help would be appreciated!!!!!!!!!
L. Lee Saunders