简体   繁体   中英

Image.FromFile with a username password. C#

Ok we need to load a file on the network, (Files are stored seperatly from the webserver).

Is there anyways we can specify a network userid a password when calling the function below?

Image.FromFile("\\IPADDRESSHERE\\GroupPictures\\");

See sample on impersonation in MSDN. See also this post about possible security problems.

Nope.

Open it using a file stream, and use Image.FromStream intsead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM