1

I have simple route map like:

routes.MapRoute("Test", "test/{action}/{id}", new {controller = "Test", action = "Index", id = ""});

My route paths are like:

"/test/do-something/1.0.1"

Which works completely fine in local testing and self hosted .NET 4.5 on IIS7+

However, when I host it in Azure, it seems to have issues with the ID containing two ".", telling me that "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.".
When I change the path to "/test/do-something/1" it works on Azure as well.

Why does Azure seem to prohibit ID's with "." and what can I do about it?

TJF
  • 2,248
  • 4
  • 28
  • 43
  • It seems to be a problem more with MVC framework rather than Azure itself. There is a similar problem described here http://stackoverflow.com/q/9273987/1916110 – Tom Feb 20 '13 at 21:06

1 Answers1

0

I would recommend using '-' in your id as opposed to '.' (periods), it's more friendly in terms of SEO.

If you really want to get it working with periods, you could use a tool called URLScan.

What is URLScan?

There is an option to configure:

AllowDotInPath=0

By default, this option is set to 0. If this option is set to 0, URLScan rejects any request that contains multiple periods (.). This prevents attempts to disguise requests for dangerous file name extensions by putting a safe file name extension in the path information or query string portion of the URL. For example, if this option...

Here is a link to the configuration.

uv_man
  • 224
  • 1
  • 3