Hello,

I have some pdf files which have an ampersand in the file name.

ie "Sample April Sales & Expenses.pdf"

When I try to put this into the browser, either by pasting or thru an
html anchor link

ie http://mywebsite/mywebapp/pdfs/Sample April Sales & Expenses.pdf

I get a "File not found"

I tried replacing the & with %26 but that didn't work either....

the funny part is that this works on my Development server but not on
the
production server, which suggests that the two machines have been setup
differently, which may cause other problems later on. Is there a
charset
setting or something in machine.config or the metabase which might
affect
this?

Many Thanks,
Yurps

Re: Funny IIS urlencoding or charset problem by Bernard

Bernard
Fri Jul 28 05:08:51 CDT 2006

Look at the IIS log file...... any clue?
do you have urlscan install? if yes..... check the urlscan log file
then modify urlscan.ini accordingly.

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


"yurps" <yurps@yahoo.co.uk> wrote in message
news:1154079549.950596.19990@h48g2000cwc.googlegroups.com...
> Hello,
>
> I have some pdf files which have an ampersand in the file name.
>
> ie "Sample April Sales & Expenses.pdf"
>
> When I try to put this into the browser, either by pasting or thru an
> html anchor link
>
> ie http://mywebsite/mywebapp/pdfs/Sample April Sales & Expenses.pdf
>
> I get a "File not found"
>
> I tried replacing the & with %26 but that didn't work either....
>
> the funny part is that this works on my Development server but not on
> the
> production server, which suggests that the two machines have been setup
> differently, which may cause other problems later on. Is there a
> charset
> setting or something in machine.config or the metabase which might
> affect
> this?
>
> Many Thanks,
> Yurps
>



Re: Funny IIS urlencoding or charset problem by David

David
Fri Jul 28 06:06:48 CDT 2006

The IIS Web log entry for the "File not found" request should clear things
up immediately. Please provide what URL is logged there.

I suspect that either:
1. the browser is not escaping " " into %20 and "&" into %26, because what
you gave as a URL is not valid.
2. You are running URLScan or other scanning products and it is rejecting
"&". Encoding it with %26 is irrelevant because scanning products will
normalize the %26 into "&" prior to character rejection.

I suggest you figure out a direct way to set up dev and production server to
be consistent; diagnosing this issue is indirect way to achieve your goal
and will cost a lot of time.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"yurps" <yurps@yahoo.co.uk> wrote in message
news:1154079549.950596.19990@h48g2000cwc.googlegroups.com...
> Hello,
>
> I have some pdf files which have an ampersand in the file name.
>
> ie "Sample April Sales & Expenses.pdf"
>
> When I try to put this into the browser, either by pasting or thru an
> html anchor link
>
> ie http://mywebsite/mywebapp/pdfs/Sample April Sales & Expenses.pdf
>
> I get a "File not found"
>
> I tried replacing the & with %26 but that didn't work either....
>
> the funny part is that this works on my Development server but not on
> the
> production server, which suggests that the two machines have been setup
> differently, which may cause other problems later on. Is there a
> charset
> setting or something in machine.config or the metabase which might
> affect
> this?
>
> Many Thanks,
> Yurps
>