A
Aahz
Hello, I have a problem with Server.MapPath founding file
I have huge project in virtual directory "Proj" located in
"My Documents/Proj" and all my project files are there.
Now I need to use a "picture.png" located in "Proj/pictures" directory.
Code is:
Image img= Bitmap.FromFile(Server.MapPath("pictures/picture.png"));
.... and problem is that my application crashes and in Exception Details
is see that picture is looked for in
"c:\inetpub\wwwroot\pictures\picture.png" ,
instead in "Proj/pictures"
I tried several version of path, ie: (../pict.., ..\pictures\pic.,
\pictures, @(\pictures.. )
and nothing worked !
Anyone see any solution please ??
Thanks;
I have huge project in virtual directory "Proj" located in
"My Documents/Proj" and all my project files are there.
Now I need to use a "picture.png" located in "Proj/pictures" directory.
Code is:
Image img= Bitmap.FromFile(Server.MapPath("pictures/picture.png"));
.... and problem is that my application crashes and in Exception Details
is see that picture is looked for in
"c:\inetpub\wwwroot\pictures\picture.png" ,
instead in "Proj/pictures"
I tried several version of path, ie: (../pict.., ..\pictures\pic.,
\pictures, @(\pictures.. )
and nothing worked !
Anyone see any solution please ??
Thanks;