Uploading assets via ClientLibrary

Hi,
I am trying to upload some images using the ClientLibrary but getting error 500 on PostAssetAsync.
I could not find any doc on this. Is it the right code?

using (var fileStream = new FileStream(@“D:!Deploy\image1.jpg”, FileMode.Open))
{
FileParameter _file = new FileParameter(fileStream, “image1.jpg”);
var _fileid = await assets.PostAssetAsync(appname, _file, new Guid("{00000000-0000-0000-0000-000000000000}"));
Console.WriteLine(_fileid.Id);
}