Create smb server in order to share files

只愿长相守 提交于 2019-12-04 16:17:21

From my experience, you can't connect to a SMB share outside of your local network. If you're trying to mount a SMB share, you'll have to use a VPN or other form of tunnel adapter to connect.

But I'm a little confused by your question. Are you looking for example code for the SMB protocol or do you just want a SMB share? Look into something simple like Ubuntu with Samba. Samba is a really easy SMB share, but like I said before, it won't work over the Internet.

There is SMBLibrary which is an open-source C# SMB 1.0/CIFS and SMB 2 Server Library.

You can implement IFileSystem and present a directory containing an "hello world" file :)

Note that Windows will only connect to servers running on port 139 or port 445, you can't specify any other port (the server:port syntax in your print-screen is invalid)

http://vm1.duckdns.org/public/SMBLibrary/SMBLibrary.htm

https://github.com/TalAloni/SMBLibrary

Tal Aloni

Why not make it easy for yourself and setup a dropbox between the customer and the "server" that way you skip any vpn's and dont have to write any code yourself, albeit you would have to install dropbox.

Alternatively you could write your own local version of dropbox that sync files to a central repo (via any transport mechanism http(s), (s)ftp...) and then have the client run an app the sync's them with the server

EDIT: take a look at http://www.lifehacker.com.au/2011/07/how-to-set-up-a-file-syncing-dropbox-clone-you-control/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!