Reputation: 647
i want to create my url like this:
www.example.com/Content/page.html
on top of my ContentControler I use:
[RoutePrefix("Home")]
and on top of my index action I use:
[Route("page.html")]
but when I request this url this error will happen:
HTTP Error 404.0 - Not Found
how i can solve this problem? thanks for help
Upvotes: -1
Views: 322
Reputation: 119156
You need to change your web.config
to get this working. Add in the line below:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
Further information on what this does here: http://www.iis.net/configreference/system.webserver/modules
Upvotes: 0