[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need to quietly upload a file to a Web Server from a WinForms application

Posted on 2006-04-22
7
Medium Priority
?
220 Views
Last Modified: 2010-04-16
Hello,

I have a WinForms application (C#), that lets the user browse files on thier hard drive. The selected files need to be uploaded to a Web Server (IIS). I do not have tooption of using FTP since the permissions are not available. I assume your responses would include doing it through an intermediate Web Page. If so, I need to do this quietly in the background.

Any ideas?

Thanks,

Khan
0
Comment
Question by:raheelasadkhan
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:vo1d
ID: 16516154
cannot you just copy the file through an unc path of the destination machine?
0
 

Author Comment

by:raheelasadkhan
ID: 16516602
No. My application will be distributed to anonymous users who will not have the rights to copy files to the Web Server. This needs to be done in a secure manner.
0
 
LVL 11

Accepted Solution

by:
vo1d earned 2000 total points
ID: 16516764
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:pgloor
ID: 16519001
Read this, if implementing a Web Service is an option:

http://www.codeproject.com/soap/MTOMWebServices.asp

Peter
0
 

Author Comment

by:raheelasadkhan
ID: 16554692
Hi,

I like the following approach:
   System.Net.WebClient webClient = new System.Net.WebClient();
   byte [] data = webClient.UploadFile(address, method, fileName);

I do not, however, know how to implement it.
 - How do I point to a specific sub-directory where the file should be saved?
 - Do I need to grant special permissions on the target directory on the web server?
 - I want some king of an authentication mechanism so no one else can upload files the same way.

Thanks,

Khan
0
 

Author Comment

by:raheelasadkhan
ID: 16789134
Sorry for the delay guys. Have accepted the solution that worked for me. Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question