Setting Null Value to .Net Variable Attribute

taher.bhataher.bha Member Posts: 48
edited 2014-07-02 in NAV Three Tier
As a requirement for one of our customers, we needed to retrieve CSV files from an FTP Server so as to parse them.
I'am using Igor Pchelnikov library which can be found here .
This works perfectly but we faced some problems while deploying at the curstomer's site ( a .Net error when getting response FTPRequest.GetResponse).
I resolved the issue within a small .Net test application using almost the same code by applying a Null Value to the Proxy attribute of the request. Here's the c# code:
ftpRequest.Proxy = null;
I cannot figure out how to do it the Nav Way.
I tried with no success declaring a Sytem.Object .Net object called NullProxy and tryed to use it to force the Null Value
(as suggested by VJEKO
I also tried using other .Net types (which theorically meet the Proxy attribute Type) with no success
System.Net.IWebProxy.'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'
and System.Net.WebProxy.'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Here's the library's code (the commented part is my own code) :
FTPRequest := FTPRequest.Create(FTPAddressFile);
Credentials := Credentials.NetworkCredential(Login,Password);
FTPRequest.Credentials := Credentials;
FTPRequest.KeepAlive := TRUE;
FTPRequest.Method := 'RETR';
FTPRequest.UsePassive := TRUE;
FTPRequest.UseBinary := TRUE;
//Proxy to be Set to .Net Null Value here
//FTPRequest.Proxy := NullProxy;
FTPResponse := FTPRequest.GetResponse;
ResponseStream := FTPResponse.GetResponseStream();
Any ideas ? Thx in advance


Sign In or Register to comment.