c# - IS it possible to save a Image to Remote computer folder using windows service? -


i have byte array of image in local computer, using windows service want convert image , save in server folder know ip address of server of have tried this

byte[] photo = publicdata.photography;                                            memorystream ms = new memorystream(photo, 0, photo.length); ms.position = 0; ms.write(photo, 0, photo.length); system.drawing.image image = system.drawing.image.fromstream(ms, true);// line giving exception parameter not valid image.save(172.16.16.32/e/xyz); 

if have bytes, why bother streams , image obejcts?

byte[] photo = publicdata.photography;                                            var path = @"\\172.16.16.32\e\xyz\file.jpg";  file.writeallbytes(path, photo); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -