I was trying to open an image from a file folder with authentication using the Image.FromFile
method but an error is occurring when I access the image.
NotSupportedException was unhandle by user code. The given path's format is not supported.
The filename I use is like this:
\\10.10.1.123\shared\picture.jpg passwrd /USER:compname\userwithaccess
Where passwrd
is the password of the user userwithaccess
in the domain name of compname
.
That path is working when I paste it in the Run, it opens the image, but why is it not working with Image.FromFile
in my application?
My code is in C#, framework is in .NET 4.0. Project is a WCF Service, to be hosted in IIS, build on Visual Studio 2010 Pro.