Asp.Net System.Web.Routing will not route the URL if .aspx is at the end

I have a weird routing problem. I have an existing website to which I am trying to add this. It works, but only if .aspx is at the end of the url. If I delete .aspx, it gives me an error: "Resource not found". I created a quick test website and copied the code to it, it works fine. The code between 2 is identical. Both of them work on the VS 2008 web server. I just do not understand. Any ideas?

Thanks Vincent

+3
source share
3 answers

Ok, I found a problem. I do not understand why this caused the problem, but if there is a period (.) In the URL, these are errors.

: http://localhost:49463/site.dev/products/keylessentrykits

: http://localhost:49463/sitedev/products/keylessentrykits, dev, .

- , ? ?

, - , MVC.

+1

, DLL ISAPI (.. ). , .aspx.

0

, . !

My solution contains several projects: network, business logic, data access, etc. My web project was called SystemName.WebForms, and when I compiled and started the Visual Studio debugging environment, only routes containing the period were routed properly. As soon as I renamed my web project to "SystemName_WebForms", all the routes were handled properly. I highly suspect that this is a mistake that you have discovered.

Thanks so much for discovering a workaround and generosity to post it!

Momentsurfer

0
source

Source: https://habr.com/ru/post/1716140/


All Articles