ASP.NET friendly URL

In my research, I found two methods.

Both need to modify the Application_BeginRequest process in Global.Asax, you can Run the code to perform the actual URL mapping (my database view contains all the friendly URLs and their mapped “real” URLs). The trick now is to make your request run through the .NET engine without the aspx extension. The two ways I found are:

>Use wildcard application extension mapping to run everything in the .NET engine.
>Create a custom aspx error page and tell IIS to send it 404.

Now this is my question:

Is there any reason why one is better than the other?

When playing games on my development server, the first thing I noticed about #1 is its worse homepage extension, not a big deal, but this is what I am used to connecting to The way of my website. My other problem with #1 is that although my hosting company is very tolerant of me (because I am their biggest customer) and would consider doing something like this, they are not safe about anything that may arise All risks are cautious.

`#2 works well, but I just think it is not as efficient as #1. Am I just thinking about it?

Thank you

I have also used #2 in the past.

< /p>

It is more effective because unlike wildcard mapping, the ASP.NET engine does not need to “process” requests for all other resources, such as image files, static HTML, CSS, Javascript, etc.

Or, if you don’t mind the .aspx extension in your URL you can use: http://myweb/app/idx.aspx/products/1-this is good.

That being said , The real solution is to use IIS 7, where ASP.NET runtime is a fully mature part of the IIS HTTP module stack.

In my research, I found Two methods.

Both need to modify the Application_BeginRequest process in Global.Asax, you can run the code in it to perform the actual URL mapping (my database view contains all friendly URLs and Its mapped “real” URL). The trick now is to make your request run through the .NET engine without the aspx extension. The two ways I found are:

>Use wildcard applications The extension mapping runs everything in the .NET engine.
>Create a custom aspx error page and tell IIS to send it a 404.

Now this is my problem:

Is there any reason one is better than the other?

When playing games on my development server, the first thing I noticed about #1 is its worse homepage extension, not a big deal, but this is what I am used to connecting to The way of my website. My other problem with #1 is that although my hosting company is very tolerant of me (because I am their biggest customer) and would consider doing something like this, they are not safe about anything that may arise All risks are cautious.

`#2 works well, but I just think it is not as efficient as #1. Am I just thinking about it?

Thank you

I have also used #2 in the past.

It is more effective because it is more effective than The wildcard mapping is different, the ASP.NET engine does not need to “process” requests for all other resources, such as image files, static HTML, CSS, Javascript, etc.

Or, if you don’t mind the URL in your .aspx extension you can use: http://myweb/app/idx.aspx/products/1-this is good.

That being said, the real solution is to use IIS 7, which is ASP The .NET runtime is a fully mature part of the IIS HTTP module stack.

Leave a Comment

Your email address will not be published.