Query string problem for images [modified]
-
I have a ASP.NET website that use an HTTP handler (.ashx) to load some images from a database. Like this:

I have created an ASP.NET log to report all the errors and I have noticed that sometime I receive from the internet wrong requests. Basically the request converts the '&' character to '& amp ;' (like an html encoded string). Like this:Attach.ashx?article=homepage& amp ;attach=EucalyptoLogoSmall.png& amp ;mode=show
(I have used the spaces inside the '& amp ;' otherwise this forum convert it to &) Do you have an idea on how to solve this problem? Thanks Davide -- modified at 11:26 Friday 20th April, 2007 -
I have a ASP.NET website that use an HTTP handler (.ashx) to load some images from a database. Like this:

I have created an ASP.NET log to report all the errors and I have noticed that sometime I receive from the internet wrong requests. Basically the request converts the '&' character to '& amp ;' (like an html encoded string). Like this:Attach.ashx?article=homepage& amp ;attach=EucalyptoLogoSmall.png& amp ;mode=show
(I have used the spaces inside the '& amp ;' otherwise this forum convert it to &) Do you have an idea on how to solve this problem? Thanks Davide -- modified at 11:26 Friday 20th April, 2007Perhaps some browser is correcting the url in an unexpected way. To write the url correctly in the html code, you should use & in the url:

Try if correcting the code makes the problem go away.--- single minded; short sighted; long gone;
-
Perhaps some browser is correcting the url in an unexpected way. To write the url correctly in the html code, you should use & in the url:

Try if correcting the code makes the problem go away.--- single minded; short sighted; long gone;
Thanks for your response. You are right I have written a wrong example. Actually I use exactly your syntax. (sorry for the copy and paste bug but I think that the forum has replaced the characters ...). If you want you can see the real page at www.devage.com . As you can see the image at the center of the page use the right syntax but I still receive the wrong request from internet. It is possible that the request came from a search spider or something similar? Here a line of the log that cause the error: 2007-04-19 09:26:49 W3SVC946387459 80.67.115.122 GET /Wiki/Attach.ashx article=homepage&attach=EucalyptoLogoSmall.png&mode=show 80 - XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) www.devage.com 200 0 0 (I hope that the forum display it correctly) Seems to be a XP with IE 6 but it is not always the same. Ideas? Thanks in advance Davide