we at our company want to buy the blackbox sft stuff, but we ran into some trouble.
We are trying to get sftp working in a Silverlight client. But after some tinkering and further research we dont have any clue how to get it working.

We just get error 10060 in silverlight, in the console demo everything is working great!

that article helped alot. Thank you.
We finally came to the conclusion that silverlight still isnt the right tool for us. We have done it in a different Framework. Maybe Silverlight 5 will be worth trying it again.

I'm somewhat in the same boat; trying to create an in-browser Silverlight app that can do SFTP uploads / downloads. I am using the trial at the moment.

I've read and understood the socket limitations per MSDN documentation, and I've applied a clientaccesspolicy.xml file on the server. I've also mapped proper ports on the FTP server (I'm using Cerberus) so it will accept connection on 4502 and 4503 (SFTP and FTP respectively).

Running OOB seems to work fine; but I would like to get a solution where it's running in-browser. I can use the .NET's Socket class and I can connect (Success status) - but I always get a 10013 error when then using the TElSimpleFTPSClient class.

I saw that there's a way to not use the internal socket, but I can't find any example on this. Any suggestions on how to proceed?

The symptoms you are observing are quite strange, as SBB components use the same .NET Socket objects internally. I guess some configuration issue might be taking place here. First of all, please double check that you are specifying server address and port correctly in the component's settings (I acknowledge that it may sound dumb - sorry if it does, - but according to our experience, incorrectly specified credentials is in fact one of the most popular reasons for connectivity issues). If the configuration is correct, could you please send us a sample project that can be used to reproduce the issue locally? I believe that the one you are doing your testing with will help much.

Indeed, there does exist a way of substituting the internal socket, however, a better solution would be to track down what's wrong with the internal socket-based configuration and try to fix it. The main argument for postponing the substitution of the socket is that this task is a bit time-consuming and will require certain amount of coding.

I have an SL 4 project that demonstrates the issue. The main page has 2 buttons:
1. Connect using socket (this one will be successful, assuming the clientaccesspolicy.xml is in place)
2. Connect using SFTP (this one always fail)

Since I can't attach a file, I'll paste the code below. Since the code is public, I've taken out the IP address - if you guys need the server to test further, email me and I'll send the IP address. Please note that I didn't put in a username/password since with or without them I always get a 10013 exception.

Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Net.Sockets;
using SBSimpleSftp;
using SBSSHCommon;

Thank you for the code, it will help us investigate the issue much faster. We have set up a local testing server, so we will need the IP of your server only if we are unable to reproduce the problem locally.

I guess we have found the reason for the issue. The internal socket component incorrectly sets up client access policy configuration while configuring the native socket component. We have managed to fix the problem, and ended up with SL-originating connections being always established correctly for us. The fix is going to be incorporated into the future SecureBlackbox installation update.

Thank you very much indeed for reporting the issue to us.

There is one thing we'd also like to ask you about. Although the fix does work in our environment and we are sure it is correct, it is always good to add another layer of confidence. Would you mind doing a little check for us so that we were sure that the problem is resolved on your side too?

We use cookies to help provide you with the best possible online experience. By using this site, you agree that we may store and access cookies on your device. You can find out more about and set your own preferences here.