iis 7 - ASP.Net MVC 404 errors when route contains an .svc extension -


i have asp.net mvc 2 site set under iis7 using integrated pipeline following route:

routes.maproute(     "myroute",     "mycontroller/{name}/{*path}",     new { controller = "mycontroller", action = "index", path = urlparameter.optional } ); 

there no other routes above route, whenever try , access above route path value has .svc extension, example:

http://localhost/myvirtualdirectory/mycontroller/test/somepath.svc

asp.net returns 404 error without executing controller (i have log message call @ start of action method). if change extension benign (like .txt) works perfectly, seems somewhere along line asp.net interpreting request standard asp.net call web service doesn't exist - asp.net 404 response (not iis response).

what causing this, , how stop happening?

is iis configured server .svc files? may need add .svc mime type iis

in iis

  1. select website
  2. click on mime types
  3. click on 'add' add .svc mime type

update

try this answer

the problem you're running due build provider registered .svc files. build provider registered default machine level web.config file.

update web.config

<system.web>   <compilation debug="true" targetframework="4.0">     <buildproviders>         <remove extension=".svc"/>                 </buildproviders> 

phil haack's full post on issue


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -