ASP.NET Friendly URLs

In my research, I found 2 ways to accomplish them.

Both are necessary modifications to the Application_BeginRequest procedure in Global.Asax, where you will run your code to actually match the URL (mine was with a database view containing all friendly URLs and their displayed "real" URLs). Now the trick is to have your requests run through the .NET engine without the aspx extension. I found two ways:

  • Run everything through the .NET engine by matching wildcard application extensions.

  • Create a custom aspx error page and tell IIS to submit it.

Now here is my question:

Is there any reason why one of them is better to do than the other?

When you played on my dev server, the first thing I noticed about # 1 was the outdated extensions on the main page, not a huge deal, but this is how I got used to connecting to my sites. Another problem that I faced with # 1 is that although my hosting company is condescending to me (as I am their largest customer) and I will consider things like this, they are afraid of any security risks that she may be present.

`# 2 works fine, but I just feel it is not as effective as # 1. Did I just rave?

thanks

+3
source share
4 answers

I also used # 2 in the past.

, , , ASP.NET "" , , HTML, CSS, Javascript ..

, .aspx URL-, : http://myweb/app/idx.aspx/products/1 - .

, IIS 7, ASP.NET HTTP IIS.

+3

​​ IIS, - . . , , IIS (.. 6). , .ini , (, this). , 404 .

+2

ASP.Net MVC Framework? , URL- , ( URL- ). . , , .

+1

ASP.NET. IIS . .aspx,.ashx .., ASP.NET. , . , IIS 6 , http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Extensions-in-ASP.NET.aspx.

. RegEx , MVC. , URL- , URL-, ".

+1
source

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


All Articles