Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 514
  • Last Modified:

Https POST

Hi,

I need to transfer a csv file using Https POST.  Can someone please guide me on how to do this?
0
shahjagat
Asked:
shahjagat
  • 2
  • 2
  • 2
  • +1
1 Solution
 
ransommuleCommented:
You could use ajax file upload control of the ajax control toolkit. (http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/)

Another option is to use html file control with form enctype setted to "multipart/form-data"

Here is a good example : http://www.codeproject.com/Articles/1757/File-Upload-with-ASP-NET
0
 
Dave BaldwinFixer of ProblemsCommented:
The web server that you are uploading the file to has to have a SSL certificate so you can make a 'secure' connection with 'HTTPS'.
0
 
ChetOS82Commented:
Like you want to allow someone to upload a file to your server?  Or you need to send a file to someone else's server via an HTTP POST request?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
shahjagatAuthor Commented:
I need to transfer the file to someone else's server.

The csv file that needs to be transfered to the server is on the clients PC.

I have the account details and url where the request needs to be sent.

Appreciate if you can help with code sample.
0
 
ChetOS82Commented:
Depending on how you want to do it, I would suggest a Windows Forms application using the WebClient.

The code would look something like this:

var wc = new System.Net.WebClient();
wc.UploadFile("https://server/page.aspx", @"C:\file.txt");

Open in new window

0
 
shahjagatAuthor Commented:
Thank you ransommule.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now