I am developing licensing for a desktop application. A simple workflow:
- User's details are submitted via HttpPost method to server (or other)
- Server checks details and generates files.
- Server sends a file to user (as a confirmation)
I need help with Step 3- how to send a file to user?
For example, User (HttpPost)
var client = new HttpClient();
var pairs = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("serialNumber", "AAAA"),
new KeyValuePair<string, string>("email", "test@123"),
new KeyValuePair<string, string>("HWID", "AAAA-BBBB-CCCC-DDDD"),
};
var content = new FormUrlEncodedContent(pairs);
var response = client.PostAsync("https://localhost:44302/testCom.aspx", content).Result;
if (response.IsSuccessStatusCode)
{
//Code for file receiving?
}
Server
protected void Page_Load(object sender, EventArgs e)
{
//Check license ID
//Issue license file - How to?
//Mark database
}