473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Handle requests for virtual URLs

I would like to handle URLs for folders that don't exist e.g.
www.mysite.com/123

123 is actually an ID of an article so I would like to trap the request and
extract the ID and display the article. If I do this now I get a 404 error
because 123 is non-existing folder.

This is kind of similar to the way sharepoint works... another non-asp.net
example is www.tinyurl.com

Any ideas?

-Emad
Nov 18 '05 #1
2 913
Hi Emad,

You might get some clues by looking at Listing 15.8 at this site:

http://www.samspublishing.com/dotnet...0681/ch15.html
"Emad Ibrahim" <ie***@nospam.hotmail.com> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
I would like to handle URLs for folders that don't exist e.g.
www.mysite.com/123

123 is actually an ID of an article so I would like to trap the request
and
extract the ID and display the article. If I do this now I get a 404
error
because 123 is non-existing folder.

This is kind of similar to the way sharepoint works... another
non-asp.net
example is www.tinyurl.com

Any ideas?

-Emad


Nov 18 '05 #2
Thanks but that won't work.

The problem is that the BeginRequest will only run if the URL is
www.mysite.com/123.aspx but will not run for www.mysite.com/123 because the
404 error is trapped in IIS before it gets to the ASP.NET engine. I need it
to run for www.mysite.com/123

-Emad

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:O$*************@TK2MSFTNGP11.phx.gbl...
Hi Emad,

You might get some clues by looking at Listing 15.8 at this site:

http://www.samspublishing.com/dotnet...0681/ch15.html

"Emad Ibrahim" <ie***@nospam.hotmail.com> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
I would like to handle URLs for folders that don't exist e.g.
www.mysite.com/123

123 is actually an ID of an article so I would like to trap the request
and
extract the ID and display the article. If I do this now I get a 404
error
because 123 is non-existing folder.

This is kind of similar to the way sharepoint works... another
non-asp.net
example is www.tinyurl.com

Any ideas?

-Emad

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Molly | last post by:
Peace, Pythonphiles! Python's std lib BaseHTTPServer: I'm stuck with a nasty spoiler -- I get erratic "Network error: disconnected by peer" for _POST_ requests only. =Background= I'm...
4
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
5
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
4
by: rzimerman | last post by:
I'm hoping to write a program that will read any number of urls from stdin (1 per line), download them, and process them. So far my script (below) works well for small numbers of urls. However, it...
0
by: dba123 | last post by:
I'm trying to implement my own Virtual Path Provider class. http://msdn2.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx ...
4
by: tommaso.gastaldi | last post by:
Hi friends I was in the need to find a sort of "definitive" :) solution to transform a virtual path such as "~/MyDir/MyFile into a full web address. In particular I needed it * within web...
7
by: AboutJAV | last post by:
Hi, I was thinking of using MSMQ to handling multiple simultaneous database request to update or insert records to table. There could be hundreds of database existing connections trying to...
2
by: ITistic | last post by:
I am about to start on a migration from a static HTML site to an ASP.NET solution. I've done a ton of these in the past as my primary job duty is developing ASP.NET sites. This is the first project...
7
by: Brent | last post by:
I'm trying to figure out how to iterate over an array that would send a series of XMLHttp requests. I'd like to have each request finish before the next one begins, but I believe that this is not...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.