How to create a baisc CMS in ASP.NET

S

shaleen.chugh

Hi,
I would like to have this functionality to create a basic CMS in
ASP.NET. What I would like is is all the page names (urls) and content
be stored in the database. When a user clicks on a link in the website,
(As there will be no page present physically in file system) all page
not founds (404 errors) in IIS should be redirected to default.aspx and
from there, I would like to look up the database and display the page's
content. Thus I could have as many pages in the database making the
system dynamic.Has anyone done this in .NET.Pls let me know
Thanks,
Shaleen
 
D

Darren Kopp

Check out url rewriting. As long as it has an ASPX extension, you
should be able to handle the 404 and such through asp.net, before IIS.

HTH,
Darren Kopp
 
R

Rob Meade

...
Check out url rewriting. As long as it has an ASPX extension, you
should be able to handle the 404 and such through asp.net, before IIS.

Forgive me if I'm wrong - but doesn't the request hit IIS before .net?
Therefore, wouldn't having a custom 404 (or other error messages) be handled
more efficiently by letting IIS manage them (even if you change the custom
error pages to your own code etc)?

Again, if I'm wrong please ignore me :eek:)

Rob
 
D

Darren Kopp

IIS will pass the request to the asp.net engine if the extension of the
page you are requesting is set to do so (aspx is set to be passed to
asp.net by default). this way the .NET framework can handle 404, 500,
etc type errors (you can define these through the web.config). for
this reason you can have pages that don't exist seem to return data
(like mapping shoes.aspx to products.aspx?id=5).

that i believe is what he is looking for, as he mentions "as the pages
do not exist", thereby being dynamic, meaning an HTTP Handler through
asp.net, though you are correct that you could handle this through IIS,
as what would happen automatically, but doing so through asp.net will
allow you to use the application_error event and so forth.

hopefully that makes sense :S

HTH,
Darren Kopp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top