s

asp .net mvc allow . in url edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 04 September 2020 | 2705

If an asp .net mvc url contains a dot it throws a 404 error

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Solution: Modify the Web.Config file

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
  </system.webServer>                

I tried this method and it worked fine. Earlier I used to add a / to the end of the URL, this method also used to work fine. But I prefer to have the URL without a / at the end.