Colon in URL

  • Thread starter Alex via DotNetMonster.com
  • Start date
A

Alex via DotNetMonster.com

I am porting an existing PHP application to ASP.NET. Everything works OK,
however IIS returns HTTP 400 - "Bad Request" error if the path or pathinfo
include the ' : ' (colon) symbol. Something like:

/MyApp/Xyz:123/MyPage.aspx

or

/MyApp/MyPage.aspx/Xyz:123

Is there any way to make IIS/ASP.NET process these requests?
 
A

Alex via DotNetMonster.com

The encoded colon symbol (%3a) does not work either. For
/MyApp/Xyz%3a123/MyPage.aspx and /MyApp/MyPage.aspx/Xyz%3a123
IIS returns the same 'bad request' HTTP error.
 
C

clintonG

Thanks for confirming that.
I know it may sound stoopit to ask but why don't you just whack the colon
out of existence?
If for some reason you have to retain such syntax I surmise you will be
compelled to use an HTTP Module to dyunamically parse and reformat the
malformed URLs on the fly.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 
A

Alex via DotNetMonster.com

I would like to have colon there so the existing (php-based) and new
applications have similar URLs. I will try implementing HTTP Module. Thank
you.
 
P

pblse2

Colon is allowed in the querystring but not in the path itself. This
goes down to the NTFS filesystem, anyone remember the ::$DATA bug ?

Although that is fixed a long time ago the fact is that if it was
allowed you system would be a lot less secure.

PL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top