I am trying to implement Resumable Uploads from my C# Console Application.
While Initiating POST Request , the server is responding with this. "The remote server returned an error: (403) Forbidden."} System.Net.WebException .
"Test1Gb.rar "---- is the File Name.
As mentioned in Google Cloud Developers Guide, i am sending the POST Request as following.
private HttpWebRequest PostCreateRequest(string authValue, DateTime date, string contentType,int contentLength)
{
var request = (HttpWebRequest)WebRequest.Create(_uri);
request.Method = PureRequestMethod(_method).ToString();
if (_webProxy != null)
request.Proxy = _webProxy;
request.Headers.Add(@"Authorization", authValue);
request.Headers.Add(@"x-goog-resumable", "start");
request.Date = date;
request.ContentLength = 0;
request.ContentType = contentType;
return request;
}//End POST Request Generation
I Have been trying this for 1 week. I don't know what is wrong with this.
Is there any help I can get from anyone?
Thankyou.