Https POST

Posted on 2012-08-31
Last Modified: 2012-08-31

I need to transfer a csv file using Https POST.  Can someone please guide me on how to do this?
Question by:shahjagat
    LVL 2

    Expert Comment

    You could use ajax file upload control of the ajax control toolkit. (

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

    Here is a good example :
    LVL 82

    Expert Comment

    by:Dave Baldwin
    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'.
    LVL 18

    Expert Comment

    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?

    Author Comment

    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.
    LVL 2

    Accepted Solution

    LVL 18

    Expert Comment

    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


    Author Closing Comment

    Thank you ransommule.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now