Free FTP Library [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can you recommend a free FTP library(class) for C#.
The class has to be well written, and have good performance.

You may consider FluentFTP, previously known as System.Net.FtpClient.
It is released under The MIT License and available on NuGet (FluentFTP).

Why don't you use the libraries that come with the .NET framework: http://msdn.microsoft.com/en-us/library/ms229718.aspx?
EDIT: 2019 April by https://stackoverflow.com/users/1527/
This answer is no longer valid. Other answers are endorsed by Microsoft.
They were designed by Microsoft who no longer recommend that they should be used:
We don't recommend that you use the FtpWebRequest class for new development. For more information and alternatives to FtpWebRequest, see WebRequest shouldn't be used on GitHub. (https://learn.microsoft.com/en-us/dotnet/api/system.net.ftpwebrequest?view=netframework-4.7.2)
The 'WebRequest shouldn't be used' page in turn points to this question as the definitive list of libraries!

edtFTPnet is a free, fast, open source FTP library for .NET, written in C#.

I like Alex FTPS Client which is written by a Microsoft MVP name Alex Pilotti. It's a C# library you can use in Console apps, Windows Forms, PowerShell, ASP.NET (in any .NET language). If you have a multithreaded app you will have to configure the library to run syncronously, but overall a good client that will most likely get you what you need.

You could use the ones on CodePlex or http://www.enterprisedt.com/general/press/20060818.html

I've just posted an article that presents both an FTP client class and an FTP user control.
They are simple and aren't very fast, but are very easy to use and all source code is included. Just drop the user control onto a form to allow users to navigate FTP directories from your application.

After lots of investigation in the same issue I found this one to be extremely convenient:
https://github.com/flagbug/FlagFtp
For example (try doing this with the standard .net "library" - it will be a real pain) ->
Recursively retreving all files on the FTP server:
public IEnumerable<FtpFileInfo> GetFiles(string server, string user, string password)
{
var credentials = new NetworkCredential(user, password);
var baseUri = new Uri("ftp://" + server + "/");
var files = new List<FtpFileInfo>();
AddFilesFromSubdirectory(files, baseUri, credentials);
return files;
}
private void AddFilesFromSubdirectory(List<FtpFileInfo> files, Uri uri, NetworkCredential credentials)
{
var client = new FtpClient(credentials);
var lookedUpFiles = client.GetFiles(uri);
files.AddRange(lookedUpFiles);
foreach (var subDirectory in client.GetDirectories(uri))
{
AddFilesFromSubdirectory(files, subDirectory.Uri, credentials);
}
}

Related

Parameter Info Tooltip using Roslyn [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I would like to develop my own tooltip for Parameter Info (which pops up as soon as you start entering parameters in a function call).
I would like to implement it using Roslyn, but I don't know where to start. Can anyone provide me a small example to get me started?
I should preface this by pointing out that extending Visual Studio is not a particularly easy, fun or straightforward endeavor.
I believe the MSDN article Walkthrough: Displaying Signature Help should get you off to a good start.
The Signature Help source is based on signatures that implement ISignature, each of which contains parameters that implement IParameter.
So first we have to create a parameter that inherits from IParameter.
Next we have to create a signature that inherits from ISignature. The key here is to implement a CurrentParameterChanged event that is fired as the user types commas, changing with parameter's definition should be shown.
This is accomplished by creating the event and firing it as follows:
public event EventHandler<CurrentParameterChangedEventArgs> CurrentParameterChanged;
public IParameter CurrentParameter
{
get { return m_currentParameter; }
internal set
{
if (m_currentParameter != value)
{
IParameter prevCurrentParameter = m_currentParameter;
m_currentParameter = value;
this.RaiseCurrentParameterChanged(prevCurrentParameter, m_currentParameter);
}
}
}
private void RaiseCurrentParameterChanged(IParameter prevCurrentParameter, IParameter newCurrentParameter)
{
EventHandler<CurrentParameterChangedEventArgs> tempHandler = this.CurrentParameterChanged;
if (tempHandler != null)
{
tempHandler(this, new CurrentParameterChangedEventArgs(prevCurrentParameter, newCurrentParameter));
}
}
They computer the current parameter based on the number of commas in the string. The ComputeCurrentParameter() method is a little too long to post here, however.
Next you have to implement ISignatureHelpSource. This interface provides signature help information for Intellisense.
The method ISignatureHelpSource.AugmentSignatureHelpSession() is where the list of parameter information is created and where you'll be adding your custom parameter information. The MSDN provided example uses pre-written strings here. In reality, you'd probably want to calculate these things on the fly, perhaps with Roslyn, depending on your goals.
Finally, you must export an ISignatureHelpSourceProvider via MEF. This allows Visual Studio to consume your ISignatureHelpSource.

.Net how to play audio in the root of the website with System.Windows.Media.MediaPlayer() [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I use this code blow in .NET. It works fine. The problem is that I want this audio to play in the root of the website. What changes should I make for this? Thanks
var sample= new System.Windows.Media.MediaPlayer();
sample.Open(new System.Uri( #"D:\voices\1.wav");
sample.Play();
In a web application, this might look something like this:
sample.Open(new System.Uri(Server.MapPath("~/") + #"\voices\1.wav");
I say might because that all depends on whether or not the voices folder exists in the root of the website. Additionally, you should probably leverage Path.Combine instead:
var path = Path.Combine(Server.MapPath("~/"), "voices", "1.wav");
sample.Open(path);
Finally, I don't know what sample is, but the Open method may not work in a website. I'm making the assumption you know what Open does and whether or not it can work in a website.
Use server.mappath("~/") <- that's the filesystem root for your website.
dim path as string = server.mappath("~/") & "/voices/1.wav"
Note that backslashes, for filesystem path, not URI.
Hope it helps.

Extracting frames of a .avi file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am trying to write a c# code to extract each frame of a .avi file and save it into a provided directory. Do you know any suitable library to use for such purpose?
Note: The final release must work on all systems regardless of installed codec, or system architecture. It must not require the presence of another program (like MATLAB) on the machine.
Thanks in advance.
Tunc
This is not possible, unless you add some restrictions to your input avi files or have control over encoder used to create them. To get an image you will have to decode it first, and for that you will need an appropriate codec installed or deployed with your app. And i doubt its possible to account for every codec out there or install/deploy them all. So no, you won't be able to open just any avi file. You can, however, support the most popular (or common in your context) codecs.
The easiest way to do it is indeed using an FFMPEG, since its alredy includes some of the most common codecs (if you dont mind extra 30+Mb added to your app). As for wrappers, i used AForge wrapper in the past and really liked it, because of how simple it is to work with. Here is an example from its docs:
// create instance of video reader
VideoFileReader reader = new VideoFileReader( );
// open video file
reader.Open( "test.avi" );
// read 100 video frames out of it
for ( int i = 0; i < 100; i++ )
{
Bitmap videoFrame = reader.ReadVideoFrame( );
videoFrame.Save(i + ".bmp")
// dispose the frame when it is no longer required
videoFrame.Dispose( );
}
reader.Close( );
There is also a VfW (which is included in Windows by default) wrapper in AForge, if you want to keep it simple without involving external libraries. You will still need VfW compatible codecs installed tho (some of them are included in Windows by default, most are not).
You could have a look at FFmpeg: http://www.ffmpeg.org/
Some C# related info: Using FFmpeg in .net?
or: http://www.ffmpeg-csharp.com/

Is there a google voice api for sending text messages? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Does anyone know of any working gvoice api? I have found this project:
http://sourceforge.net/projects/gvoicedotnet/
but the login appears to no longer work since the url changed some months ago.
Does anyone have a good question for sending out text messages to users of my website?
I found one: SharpGoogleVoice.
https://bitbucket.org/jitbit/sharpgooglevoice/downloads
It only has text messaging support, but it works well and looks like good work.
Self-promotion: my API, SharpVoice, works/worked quite well (hasn't been tested in some time): https://github.com/descention/sharp-voice
Voice voiceConnection = new Voice(loginEmail, loginPassword);
string response = voiceConnection.SendSMS(smsToPhoneNumber, smsMsgBody);
What you need is an SMS gateway that will let you send out text messages via an API. A quick Google search yields Zeep Mobile, which lets developers send SMS text messages for free from their application.
Because it's free, there may very well be some restrictions, but if you architect your app correctly using a strategy or adapter pattern then you should be able to replace this module later on down the road with something more advanced based on the needs of your application.
The primary restriction on the free plan is that it's ad-supported. This may very well be ok for you during initial development and testing, but your production users will likely find this to be a significant problem in using your service. Zeep does have a paid plan that eliminates the ads, and there are of course countless other SMS gateways that have API's that you can use for a fee.
You can get send messages with Twilio.
An example using the C# helper library:
https://www.twilio.com/docs/libraries/csharp
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
static void Main(string[] args)
{
// Find your Account Sid and Auth Token at twilio.com/user/account
string AccountSid = "YOUR_ACCOUNT_SID";
string AuthToken = "YOUR_AUTH_TOKEN";
var twilio = new TwilioRestClient(AccountSid, AuthToken);
var message = twilio.SendMessage(
"+15017250604", "+15558675309",
"Hey Kyle! Glad you asked this question.",
new string[] { "http://farm2.static.flickr.com/1075/1404618563_3ed9a44a3a.jpg" }
);
Console.WriteLine(message.Sid);
}
}

Are there any KeyValue stores used by .NET? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am looking up keyvalue stores that support C#, but i found that most of them are implemented by Java. Could anybody recommend some to me? It would be super if it is very light-weight, i.e., appearing as a library. thanks!!
Dictionary<key,Value>
http://msdn.microsoft.com/en-us/library/xfhwa508.aspx
KeyValuePair<string, string>
http://msdn.microsoft.com/en-us/library/5tbh8a42.aspx
If you want an in-process, persistent key-value store (like Berkeley Db) then take a look at the PersistentDictionary which is part of the ManagedEsent project. A persistent dictionary looks like a normal dictionary but is backed by a database. If you build from the current sources then you will get Linq support, which lets you do queries.
If you mean a NoSQL store, What NoSQL solutions are out there for .NET? has a list of these.
There are tons, depending on your requirements.
Another you can consider is System.Runtime.Caching namespace, which has been added to .NET 4.0.
is this what you mean by a key Value pair..like a hashtable()
Hashtable = ht = new HashTable();
or
Dictionary<double,string> d1 = new Dictionary<double,string>();
or
Dictionary<String,string> d2 = new Dictionary<string,string>();
etc.
> I am looking up keyvalue stores that support C#
If you're looking for a native .NET key value store then try NCache. Its built using C#. There are none other i think.
Its offers much more than just a simple .net key value store. You can stick to just keeping keys and values in it.
Cache cache = NCache.InitializeCache("CacheName");
cache.Add("Key", "Value");
object value = cache.Get("Key");
Redis is a excellent one. And there is amazing c# redis client ServiceStackRedis also available. Its very lightweight.
And if you want to try redis on windows, you can find the windows version here
GetCache is a very simple key-value in-memory cache developed in .Net 4.5.
Server and client library can be downloaded fron Nuget.
http://www.nuget.org/packages/GetCacheServer/
http://www.nuget.org/packages/GetCacheClient/
FASTER - A fast concurrent persistent key-value store and log, in C# and C++
https://microsoft.github.io/FASTER/

Categories