.NET

Upload Binary data as HTTP POST

Below is the ASP.NET C# implementation of Uploading binary data like images as POST request to target URL: private bool UploadFile(string PostURL) { try { int contentLength = fileUpload.PostedFile.ContentLength; byte[] data = new byte[contentLength]; fileUpload.PostedFile.InputStream.Read(data, 0, contentLength);…

Continue ReadingUpload Binary data as HTTP POST

Get Remote IP@

When your server is behind any proxies or load balancers, the remote IP@ gets masked. In such scenarios, the server variable "REMOTE_ADDR" may not provide the correct client IP@. The only way to get remote addresses is…

Continue ReadingGet Remote IP@