I want to allow the user to select a folder path in a Linux file system from my Windows forms application. There are a number of Linux machines on my network, but I'm not sure how to go about accessing them from Windows. A file browser dialog for the file system of each Linux machine is ideal, but I'm not sure if it is realistic. Is this possible?
I have not worked with Linux before so I am a bit over my head right now, any help / workarounds are appreciated!
Thank you.
This would be done by mounting your linux systems onto your windows PC as network drives. See how to do this here (guide is for windows 10 but same principal applies.)
After doing so you should be able to see and navigate the drives using a standard OpenFileDialog. If you need more help just leave a comment and I can try help with what you cannot understand, but try google or search stackoverflow first and someone may already have the same problem as what you are facing.
Related
I have one windows service which used to place files on network drive. It is working fine on some machines but on some machines it is not working fine. Although when i am trying to do with Window application it is working fine.
Please suggest me how i can solve this issue. As there are more than 100 of systems where this service installed but I am getting this issue random basis.
Thanks all for your valuable comments.
I found one more thing and this is definitely missing from Networking team. They had provided the access only on child folder not on the root folder that's why service was not able to hit mapped directory.
After provide the full permission to root directory, service is able to place files.
All possible scenarios which provided in comments will also be helpful for me to solve issues related with same domain.
I have a Windows 10 universal app that is running on a Windows 10 Mobile device. I noticed from the Windows 10 Mobile device, it does have a file explorer but it limits you to only see certain "Known Folders" such as music, documents, downloads, etc... and that is all.
Furthermore, when I plug the device into my development machine via USB, I can browse the device but again, only the Known Folders above.
In my app, I am writing to a log file and that log file is stored to LocalStorage, under a folder for my app name, for example:
var dataPath = ApplicationData.Current.LocalFolder.Path;
I simply need to browse MY LOG FILE, that MY APP CREATES, in MY APP FOLDER. I read about a ton of, in my opinion hacks, to get access to this file/folder. For example, there are some third party applications that still mainly claim to target Windows Phone 8/8.1 but will still technically work for 10 such as:
Windows Phone Power Tools
Isolated storage spy
etc....
Then I also read articles on how to use a file in Pictures (or voice recording) and go to file properties to then gain access to the root or to create a root shortcut on the development machine and copy it to the mobile device, however, these are typically a year or more old and no longer work on my device (I suspect MS patched these hacks).
So, all that said, I would like to see a good way to access the root drive for development, or at least my app folder in the LocalFolder so I can access my files (such as logs or the sqlite db file). Maybe there is a way already but my google searches haven't turned anything up just yet.
Thanks!
As you've known, we can use some third party tools like IsoStoreSpy or Windows Phone Power Tools to access Isolated Storage. Although they are designed for Windows Phone 8 & 8.1, but they can also be used for Windows 10 Mobile. With these two tools, we can access LocalFolder, TemporaryFolder and RoamingFolder. For more info, see similar question: Accessing storage of simulator/device while debugging.
Besides these third party tools, there is also build-in support in Windows 10. We can use App File Explorer to view and manipulate files stored by your sideloaded apps. This is a new, cross-platform version of the Isolated Storage Explorer from Windows Phone 8.1. This tool should be able to work no matter your application is deployed in Debug mode or Release mode. But please note that this is a new tool added to Windows Device Portal in the Anniversary Update.
To use this feature, we must enable Device discovery and Device Portal. Then we can access application storage in web browser like following:
For more info, please see Device Portal for Mobile and Using the App File Explorer to see your app data. Also the similar question: Windows 10 Mobile: how can I see inside on my app folder? might be helpful.
I had a similar problem to solve few months back. I ended up doing two things:
I've implemented a 'Send Logs' button in settings that would upload logs to a ftp server. Actually it was a bit more than that, all installations of this app were managed by a central server and there was 'Get logs' button on the server side that would send request via push channel to the device to get the logs.
Got my hands on a Interop-unlocked device that I would use if the app was in a state that would make first option not possible.
Hello all,
I just created a C# application that connects to a server database, it can insert, update, search, delete the files from the database, more than this I can view all the files in a listview.
I have encountered the following problems:
1) I don't want the application to be instaled on every PC from work, I want it to be instaled on a shared drive and every PC can open the application from a folder inside that drive (I don't want them to connect remoutly to my PC). I heard that there would be an another solution, that I can put my app into a Site (I have no idea how.. never did that before);
2) I have no idea how many PC can use the application at the same time ( but somehow I don't think that should be a problem because I tried inserting into the database through SQL manager at the same time with a mate and there were no problems) but if I put the application to be shared from the same drive it could cause problems;
3 I would love some tips how to make my application work nicer ( it started getting laggy after a few show/hide text boxes and labels..
Well the most important for me would be point (1), I have no idea how can I do this, I am sure that it is possible somehow, I accepted doing this C# app without knowing like anything but now it makes me curious like hell!
Thank you in advance! (sorry for bad english)
Image:
my first C# applicatipon
You can use something like ClickOnce so the users can download and execute your app.
From the site:
You can publish a ClickOnce application in three different ways: from
a Web page, from a network file share, or from media such as a CD-ROM.
A ClickOnce application can be installed on an end user's computer and
run locally even when the computer is offline, or it can be run in an
online-only mode without permanently installing anything on the end
user's computer.
Either that or convert to windows forms application to a web based application using ASP.Net.
I am using visual studio 2010 and I have searched on the net for help and other people using the DirectoryEntry("WinNT:") but it doesn't seem to work for me. I can see my network workgroups and if I use DirectoryEntry("WinNT://MYWORKGROUP") I can't see any computers listed.
Please help I am not sure why it isn't working for me.
Thanks
Getting computer names from my network places:
Do not use DirectoryServices unless your sure of a domain environment. The System.DirectoryServices class is an ADSI wrapper that dosent work without an Active Directory to query against. NetServerEnum() works on workgroups and domains but dosen't guarantee the most reliable data (not all machines may show up). It relies on the Computer Browser service.
To browse the local Windows network, NetBIOS name resolution must be running and correctly configured. In a corporate network that often means the presence of a WINS server. The required components are not enabled by default on modern Windows installations.
Before trying to do anything from your own code, ensure that the infrastructure is in place. Open Windows Explorer and expand the "Network" node. If name Windows browsing is correctly you should see the list of computers on the network there. If the list is empty, the problem isn't in your code.
I am using Asp.Net/C# in my application,I have a requirement where I need to access USB devices of client computer and run one of them.It is ok if the user has right to allow it or not.I need to know whether it is possible at all from browser.If yes what can be used here flash or silverlight.
Any suggestions are much appreciated.
Thanks
In other words, "can I use web-client technology running in browser sandbox for system programming". No, you can't. Neither Flash nor Silverlight can detect or run anything from USB devices. You need desktop technology like Adobe AIR or Microsoft WPF to do that.
Update:
If you really need to do something from browser that browser can't do, there is a way. Install helper application on user machine and control it from browser app via local network. I did it once, so it's possible. If you go this way, use what you like most - both Flash and Silverlight can do this.