473,399 Members | 3,302 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,399 software developers and data experts.

URL Mapping

ed
Hello All,

In my app I have a page that shows articles something like
showarticle.aspx?articleid=xxxx, I want that it looks like:
/showarticle/article-one-title.aspx and so forth, so I was thinking to use
the “new” asp.net 2.0 URL Mapping instead of write a http module to handle
this.
I set the settings this way: <urlMappings configSource="Mappings.xml" /and
I‘m planning to update the xml file every time a new article is added. I’m
not happy with this way, will be better to use the HTTP Handler? Any
recommendation?

Thanks!

Sep 29 '06 #1
4 2287
Hi,

ed wrote:
Hello All,

In my app I have a page that shows articles something like
showarticle.aspx?articleid=xxxx, I want that it looks like:
/showarticle/article-one-title.aspx and so forth, so I was thinking to use
the “new” asp.net 2.0 URL Mapping instead of write a http module to handle
this.
I set the settings this way: <urlMappings configSource="Mappings.xml" /and
I‘m planning to update the xml file every time a new article is added. I’m
not happy with this way, will be better to use the HTTP Handler? Any
recommendation?

Thanks!
It really depends on your use case. If a program can deduct the mapping
according to the article's name or content, then I would rather
recommend going with a HttpModule. It's quite easy to do in 2.0 anyway.
The urlMappings solution is easier, but if you must update and upload
the config file every few days, it might be too much of a trouble.

Note additionally that every modification to the web.config file causes
the application to restart, and all existing sessions are closed. In a
productive environment, it might not be possible at all.

http://msdn.microsoft.com/library/de...lrewriting.asp

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 29 '06 #2

IIS 7 will probably support URL rewriting at some point, or try one one
of the ASP.NET 2.0 rewriting components that are available, this one is
supposed to be good:

http://www.urlrewriting.net/

ed wrote:
Hello All,

In my app I have a page that shows articles something like
showarticle.aspx?articleid=xxxx, I want that it looks like:
/showarticle/article-one-title.aspx and so forth, so I was thinking to use
the "new" asp.net 2.0 URL Mapping instead of write a http module to handle
this.
I set the settings this way: <urlMappings configSource="Mappings.xml" /and
I'm planning to update the xml file every time a new article is added. I'm
not happy with this way, will be better to use the HTTP Handler? Any
recommendation?

Thanks!
Sep 29 '06 #3
ed
Thanks so much for your advice. I was afraid for the app restart too.

Will be nice to be able to write in the future something like this:
<urlMappings configSource="GetMapingXMl.aspx" /and this page will build the
xml with the updated mappings ;-) hehehe don't you think?.

"Laurent Bugnion" wrote:
Hi,

ed wrote:
Hello All,

In my app I have a page that shows articles something like
showarticle.aspx?articleid=xxxx, I want that it looks like:
/showarticle/article-one-title.aspx and so forth, so I was thinking to use
the “new” asp.net 2.0 URL Mapping instead of write a http module to handle
this.
I set the settings this way: <urlMappings configSource="Mappings.xml" /and
I‘m planning to update the xml file every time a new article is added. I’m
not happy with this way, will be better to use the HTTP Handler? Any
recommendation?

Thanks!

It really depends on your use case. If a program can deduct the mapping
according to the article's name or content, then I would rather
recommend going with a HttpModule. It's quite easy to do in 2.0 anyway.
The urlMappings solution is easier, but if you must update and upload
the config file every few days, it might be too much of a trouble.

Note additionally that every modification to the web.config file causes
the application to restart, and all existing sessions are closed. In a
productive environment, it might not be possible at all.

http://msdn.microsoft.com/library/de...lrewriting.asp

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 29 '06 #4
Hi,

ed wrote:
Thanks so much for your advice. I was afraid for the app restart too.

Will be nice to be able to write in the future something like this:
<urlMappings configSource="GetMapingXMl.aspx" /and this page will build the
xml with the updated mappings ;-) hehehe don't you think?.
I doubt that will happen, considering how easy it is to use HttpModules
in ASP.NET 2.0 to rewrite URLs, and also how many solutions already
exist on internet.

Greetings,

Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 29 '06 #5

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

Similar topics

2
by: Frank | last post by:
Hi there, In web.xml, I know it's possible to do path mapping: <path-mapping url-pattern="/aaa/*" real-path="C:\TEMP\"/> So a call to myserver.com/mywebapp/aaa will redirect to c:\temp. ...
20
by: Pierre Fortin | last post by:
Hi! "Python Essential Reference" - 2nd Ed, on P. 47 states that a string format can include "*" for a field width (no restrictions noted); yet... >>> "%*d" % (6,2) # works as expected ' ...
6
by: naruto | last post by:
Hi all, I have the following being defined in a A.cxx file. // define in source file. Not exported to the outside world (this cannot be // moved to the header file ) #define CHANNEL_0 0...
10
by: mike | last post by:
regards: Where to find tag mapping-table of HTML translated to XHTML1.0 Any positive suggestion is welcome. thank you May goodness be with you all
1
by: Tamas Hegedus | last post by:
Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. ...
3
by: Elder Hyde | last post by:
I was reading this interview with Hejlsberg, when suddenly the conversation turned to O/R mapping. Hejlsberg talked as if he had had to design an O/R mapping for .NET (he said ".NET had each one of...
4
by: BentleyInc | last post by:
I'm trying to find a way to add a whildcard application mapping to aspnet_isapi.dll in IIS programmatically.... been looking into IIS administrator reference but didn't find the right function to...
1
by: none | last post by:
Hi, I'm trying to establish table mappings, and I've hit a snag. At the point to where I try to fill the schema (DB_adapter.FillSchema), I get an exception, and the message is as follows:...
1
by: Ram | last post by:
Hey, I'm having a trouble mapping a connecting between 2 of my tables. We have 2 tables - the simplest "dept", "emp" tables which are mapped to 2 classes. Class Dept contains 2 properties for...
6
by: Jan Kucera | last post by:
Hi, does anybody know about wildcard mapping ASP.NET 2 in IIS6? Any tutorial? Thanks, Jan
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.