VB Magic

2012/11/19

Hit a 404 error with a dot in an MVC 4 URL

Filed under: .NET, ASP.NET MVC — Tags: , , , , , — vbmagic @ 6:13 pm

Another quick post regarding passing a parameter that contains a “.” in it.

For example the below URL

http://myhost/home/edituser/me@mail.com

Started to cause a 404 error. I wasn’t sure why this was happening and after a lot of web surfing I came across the following information on Stack Overflow

Adding the following line into the HTTP <handlers> section for the path that contains the error:

<system.webServer>
    ....
    <handlers>
      ....
      <add name="ApiURIs-ISAPI-Integrated-4.0" path="/home/edituser/*" verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>

Will fix the issue.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: