Hello I got a Problem sending a HTTP Request in C# I´d like to upload a File in a HTTP Request but I´m not sure how to do it
Here is the html Code:
<form action="/decrypt/upload" method="post" enctype="multipart/form-data">
            <fieldset>
                <p class="formrow file_upload">
                <label for="dlcfile">Container File</label>
                <input type="file" class="file_field" name="dlcfile" id="dlcfile"/>
                <input type="text" value="Click here to select a file..." class="file_overlay" />
                </p>
                <p class="buttonrow"><button type="submit">Submit »</button></p>
            </fieldset>
        </form>
And here is my C# Code:
public static void decryptContainer(string path)
    {
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://dcrypt.it/decrypt/upload");
        request.Method = "POST";
        request.ContentType = "application/x-www-form-urlencoded";
        using (StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.ASCII))
        {
            writer.Write("dlcfile=" + path);
        }
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            Console.WriteLine(reader.ReadToEnd());
        }
    }
I know that I have to give the parameter an File, but I just don´t know how to handel that in C#, could someone plx help me :)
 
     
    