Answered by:
Illegal characters in path. ?

Question
-
User-1103495211 posted
I've got an error: "Illegal characters in path." But i don't understand why ?
The code is:
png = ConfigurationManager.AppSettings["localpath"] + "images\actie.png";
imgF = System.Drawing.Image.FromFile(@png);In my Web.config i have:
<add key="localPath" value="C:\websites\HV tweewielers\" />
The error is on the last row, if u get with the arrow on @png i get: C:\\websites\\HV tweewielers\\images\actie.png
But the path is correct ... Quite strange because it works perfect if i add: c:\websites\hv tweewielers\images\actie.png ....Friday, August 8, 2008 8:41 AM
Answers
-
User-1948400566 posted
Hi dude
instered of using like this images\actie.png
try like this images\\actie.png
and dont use space for folder name some time it will show error in that also the HV Tweewielers have space so it may consider as illegal character in path so check it out that tooo
if u have problem query me
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 8, 2008 9:26 AM -
User-1734134863 posted
Hi,
Based on my experience, the character "@" is fit to the value of the string and it is not suitable for the variable.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 11, 2008 10:49 PM
All replies
-
User-1948400566 posted
Hi dude
instered of using like this images\actie.png
try like this images\\actie.png
and dont use space for folder name some time it will show error in that also the HV Tweewielers have space so it may consider as illegal character in path so check it out that tooo
if u have problem query me
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 8, 2008 9:26 AM -
User-1103495211 posted
The space doesnt mather, i changed the png part in:
png = ConfigurationManager.AppSettings["localPath"] + @"images\actie.png";
imgF = System.Drawing.Image.FromFile(png);Like this it works great but @ doesnt work well for a string.. strange
Friday, August 8, 2008 9:39 AM -
User-1734134863 posted
Hi,
Based on my experience, the character "@" is fit to the value of the string and it is not suitable for the variable.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 11, 2008 10:49 PM