I have a requirement for an admin user to set up an export directory on the web server, or relative to the web server using a UNC. Is there anything already out there that I can use for this, or must I recurs a limited directories and populate a home-rolled directory browser on the client?
I noticed this today ...a JQuery File Tree plugin. The link includes "connector scripts" in a number of server side languages including asp.net:
http://abeautifulsite.net/notebook.php?article=58
Looks awesome (and well documented) but I have not tried. I would love to hear feedback if anyone has...
Every solution to this problem I have seen is a home-rolled implementation of directory browsing.
When attaching a database on a SQL server, Microsoft uses a "custom" treeview to show drives/folders/files available to be attached.
Also, on DotNetNuke (an Open Source ASP.NET Content Management System) they have a home-rolled implementation as well for uploading files to Portal Folders...
Related
I would like to implement a functionality in an MVC3 web application which would allow users to edit Microsoft Office documents directly with WebDAV but unfortunately I have no clue where to start. I have to make links for the documents which, once clicked, would open the documents and after the user saved a document, it should be uploaded back to the server.
Any help is appreciated. Thanks in advance.
You would need probably some web browser plugin (ActiveX or Netscape API), which would handle this for you. You can pass the url of the document (with some authentication cookie) to that plugin on clicking of the link. The plugin than can download the file, open it using ShellExecute or similar (e.g.Launch services on mac) and on close of the file you can upload the file.
This is of course very basic usage and does not employ the strength of webDAV protocol. You should handle webdav locks for example or detect etags of the file before upload etc. to prevent some data loss. You would have to read more about webdav: http://www.ietf.org/rfc/rfc3744.txt.
Does anyone know of a third party control or set of code that allows directory browsing integrated into a web page that uses master pages? So I'd need a content control that I can simply give a local server directory to as a root directory and it will display any files and directories in the browser underneath the root.
I don't need any upload support but download support is ideal.
Looking for something relatively cheap - ideally less than $300 - the cheaper the better.
Thanks!
Have a look at telerik RadControls, and especially the FileExplorer control.
It's not exactly "cheap", but the controls suite is very powerful.
These folders appear in my .NET Web project. Why do they appear? Are they useful?
They are used as part of the FrontPage server side extensions which do
change tracking (mostly the _vti_cnf)
code/script used by FrontPage specific controls (mostly the _vti_script)
general settings
The old FrontPage program and Dreamweaver both used it.
The VTI part is actually because FrontPage was originally created by Vermeer Technologies Incorporated (note the acronym) and then bought by Microsoft and it just stuck.
They're part of the legacy FrontPage server extensions. The _vti_ prefix refers to Vermeer Technologies Inc., the original developer of FrontPage which was subsequently bought by Microsoft. They would appear if you installed these IIS extensions - they're not needed unless you have a legacy client which requires FrontPage extensions to be there.
Expression web also uses them. In particularly the “_vti_cnf”, “_vti_pvt”. Do not delete them. The “_vti_cnf” holds your meta data. If you delete it, you can rebuild it by Recalculating Hyperlinks. You will find one in every folder.
Delete the “_vti_pvt” will cause you problems, in recognizing the local website. You should only see this in the main folder.
If you have problems with updating the web server (EW or FP incorrectly uploads files that have already been updated), do not delete the contents of the _vti_cnf folder. Usually, just recalculate the hyperlinks via EW or FP and that will take care of things.
I'm creating an ASP.NET web application to schedule tasks on our server from a remote location using a .NET Wrapper for Scheduled Tasks. However, I'm stuck.
The user needs to be able to browse the file system on the server to retrieve a "file to run" for the new task that the user's creating in this application. I need to get the filepath/filename and pass it into the .NET wrapper.
I've tried using HTMLInputFile, but I haven't found a way to make that work for me.
Any help is appreciated.
Thanks
Update:
For this project, we've decided to simply list the executables in a dropdown box that would be available to users since they don't really need total access to the file system, just for security's sake.
HTMLInputFile is used to browse the client's file system and upload a file to the server. It isn't used to browse the server's file system.
You will need something quite different. You will need some server side code to display the server side folder structure to the user via the browser.
There is an example of a basic implementation of this here.
Update:
With that sample, the path that you replace "yourfolderHere" with needs to be a virtual path, rather than an absolute path. So for example "C:\Inetpub\wwwroot\uploads" won't work, but "uploads" will work.
I hope it goes without saying that there are serious security issues to think about when implementing something like this.
The HTMLInputFile will only work on the client-side machine.
You need to write a filesystem browser in ASPX/HTML that browses on the server-side.
Shouldn't be that hard to do.
You can't use the <input type="file" tag
This brings up a client-side dialog that browses the client machine.
As far as I am aware you need to create your own 'browser'.
eg You could use the My.Computer.Filesystem classes to retrieve a list of files in a folder and show those on the webpage. The user then selects the relevant file and posts a response back to the server.
You can use System.IO.Directory to get directories and files. These can be displayed in a number of ways. A simple browser / file selection should be possible in less than 50 lines of code.
Also be aware that you may need to grant extra permissions to the user that your web app runs as so the file system is accessible.
There are also various security implications around this, so don't grant access to everything unless you really need this.
We have created a web application, using ASP.NET, that allows users to upload documents and attach them to business entities, like customers, contacts and so on.
The application runs on the intranet and all files are uploaded through the web application into a shared folder on the server.
I would like, right from the web page, for the user to open the actual file, edit it and then save the changes back to the original location. This is a piece of cake in a Windows environment, I'm just wondering what, if any, is the best way to handle this in a web environment?
The files are usually Word documents, Excel documents and images.
Clarification
We would display all the attachments in a list format. We would like it so that the user would click on an edit link and the file would be opened in the appropriate application, for example, Microsoft Word or Microsoft Excel. I think the file associations in Windows would already handle this. We are just trying to save our user the time to download the original file, make their changes, delete the old file, and the upload the new file.
SharePoint does this by exposing FrontPage extensions which Word and Excel know how to deal with.
If you want to look at a commercial product for ASP.NET that allows you to edit images with AJAX (no need for installed software), I work for a company that has one (Atalasoft)
WebDAV is probably what you want. (Free)
If all your client computers are Windows, map a shared folder on the server to the same drive letter on every client and use the file:// format.
Let's say you share \ServerName\ShareName to H: on every client's computer, the you can make the link as file://h:\pat_to_the_file_under_your_share\fileName.doc
If not every one of the client's computers are in Windows, then you might try to make your links as follows (not sure if ot works):
file://\ServerName\ShareName\pat_to_the_file_under_your_share\fileName.doc
I'm trying to do something with using file:// instead of http:// but it's real sporadic based on the browser. Seems to work fine in IE, okay in Firefox, and goes nowhere in Chrome.
Looks like I may just be stuck with downloading, editing, and re-uploading the document.
It sounds like you want something similar t eRoom, where the browser works in conjunction with a component that intercepts a stream from http, stores it in a temp folder, then fires up Word or Excel and allows you to edit the stream.
You may have to create a component that will intervene and create a temporary local copy of the file.
This tool should do what you need.
http://www.dlitools.com/dlitools/dlitoolsHome.nsf/0FA6B8B31F831F468525736B0001C606/4BBD7E8684EA8DB78525754E006C63A3?OpenDocument