I have two websites: Website A and Website B. Is it possible to use fileupload control on website A and through which I upload the file to website B.
I have been looking for solution for some time but not found any.
I know we can access any file on website B so it's not have any access restriction.
if you're using a shared web host then your options are limited, check this link
http://madskristensen.net/post/simple-ftp-file-upload-in-c-20
and check the last post in this
upload files to a different server
Related
I just wanted to ask is it possible to upload files to IIS server? If it's possible please describe me how to do it, thanks. I've been using google since 1h and i found nothing.
If all you need is file upload to your web server, you could set up FTP on your server
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-ftp-7-on-iis-7
If you are looking for a file upload capability for your web application, you can use the FileUpload control. The file would be POSTed to your page once you submit your form. The MSDN page has a an example of how to use the control and save the file on the server side.
Create a web application that has file upload capability
Host the web application in IIS.
Files uploaded will be dropped in your applications folder.
Take a look at for an example of file upload with WebApi: http://blogs.msdn.com/b/henrikn/archive/2012/03/01/file-upload-and-asp-net-web-api.aspx
I would like to know if it is possible to open a directory from intranet MVC application ? I have been searching about it but i don't found anything.
I tried to open from javascript using window.open('url') but i get unauthorized access.
Thanks,
Tiago MourĂ£o
IMPOSSIBLE !!!
web browsers does not have allow web pages to access to disk drives.
web pages only can read/write cookies.
FileUpload control allow access to the files, only with user action(scripts no allowed).
I found a way to do resolve this problem. If you create a background process using Process.Start('location'), the application opens directory folder.
Tips:
Process.Start() generally used in windows application and if used in
web applications, a process will start on server(not on user agent
that run current page).
you get unauthorized access error, because of IUser has limited
access ...
1) Web Applications can read/write any file and folders on server side with assigning permission.
2) WebApplication with Some sideway can access to file & folders in web pages (client side) !!!
with JavaScripts:
Write a browser add-on with requested functionality, then install on
user agent(browser).
now with call method/function in add-on, you can do the operations
that does not allowed with JavaScript & etc.
with VBScript(Obsoleted) that run/supported only in MsIE:
can using FileSystemObject to full access files and folders.
can using CreateObject to create instance of each object in OS and
working with it.
Finally my answer is IMPOSSIBLE.
I am designing a website and in one of my website page I want to access to a local Ftp server and upload and download files from it but I dont know how to design it like a list and how to download and upload and delet Files From Ftp would u plz guide me?
You can use the FtpWebRequest class to do this. I think you should try to get a list of files before you do any uploading/downloading, as a read is usually the easiest to do.
You can see how to get a directory list here.
Also, do not think of this as a asp.net "thing". It's part of the .Net framework. Create a service (or dal/repo) - a class which is responsible for handling your ftp calls. This way you can decouple it from the rest of your code.
You can then use a TreeView to show the contents of your ftp.
I am developing a web application in C#.net. I need to edit a file placed on the server in browser it self(Without downloading it on local machine) and when I save that file, the changes should be reflected in file. For this I want to use google API but I don't know how can I use this.
I want to do like below.
When I click on file name, it should open in browser.
When clicked on edit, it open in edit mode in browser using google doc.
When I save that file, the changes should be reflected in my file which is placed on company server.
How can I do all this thing with google doc API?
Install Google Drive on your server.
Edit the file in Google docs, let Google Drive sync it to the local hard drive.
It is not possible for HTTP protocol, because the basics system doesn;t support it. You can open the file but the file will be downloaded to your local machine in then it will open, you have to specify the MIME type in IIS.
You can use two ways to do a similar job done.
1 By Using FTP
2 Customized solution : Make a page put a text field and load the file (.cs) in it and with submit save it to the file back.
You can embed a google doc in Webpages. But the file would be accessed and saved on Google's servers and not your company server:
Wordpress allows you to do it. Potentially you can see if it possible to do it in a similar way:
http://en.support.wordpress.com/google-docs/
I am not sure if Google has an option of accessing docs from servers outside google's domain.
I'm creating a web tool in ASP.NET(c#) which can upload images to different sites and one of the sites is not set-up in FTP. Is it possible to upload files in the that site(with credentials)? If it is, can you please enlighten me on the process?
Thanks...
You could look at creating an image admin page which uses the FileUpload control.
Take a look at the fileupload control. It allows the user to do exactly that.
You can use the FileUpload control. But it will only allow upload data to the web server.
But if you need to save file to a different server, you will probably need handle the POST request.
I think this article about Writing Server-Side Upload Code may help you.