[RESOLVED]without cshtml Extension

I would like to page to my work without .cshtml extension. I have already have a code in web.config. But still no luck.

   <system.webServer>
  <security>
   <requestFiltering>
     <fileExtensions>
       <remove fileExtension=".cshtml" />
       <add fileExtension=".cshtml" allowed="true" />
     </fileExtensions>
    </requestFiltering>
  </security>
</system.webServer>

i have tried but still no luck

By default, the Web Pages framework allows you to omit the file extension in urls. You don’t need to add anything to your web.config file to get this to work. If you have a file called about.cshtml, you can request it simply by typing
www.yourdomain.com/about in your address bar.

Leave a Reply