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

virtual directory with data store in db

I want to create a "virtual" directory (not and IIS virtual directory, which
really seems to just be a link to a real directory) where the contents of
that directory can be read from a database.

That is, right now I have a webform that can read an article out of a
database, with a url something like:
http://some-domain/article.aspx?id=1

I'd prefer to have a url like: http://some-domain/articles/CoolArticle.html

where some application (dll, webform, http handler?) takes any url in the
path /articles/ and uses the "CoolArticle.html" title to find the file in
the database. I know the db side, just not the web side.

Thanks in advance!

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com

Nov 18 '05 #1
2 1084
Michael, you need to use HTTPModule for intercept and web requests.
first you need parse request string for extract all needed parameters, then
retrieve data from database and next RewritePath of Context class
here is samples
http://www.aspnetpro.com/NewsletterA...200309pj_l.asp
http://www.15seconds.com/issue/030522.htm
and this about IIS settings
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

hope this help

"Michael Mayer [C# MVP]" <mi**@mag37.com> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
I want to create a "virtual" directory (not and IIS virtual directory, which really seems to just be a link to a real directory) where the contents of
that directory can be read from a database.

That is, right now I have a webform that can read an article out of a
database, with a url something like:
http://some-domain/article.aspx?id=1

I'd prefer to have a url like: http://some-domain/articles/CoolArticle.html
where some application (dll, webform, http handler?) takes any url in the
path /articles/ and uses the "CoolArticle.html" title to find the file in
the database. I know the db side, just not the web side.

Thanks in advance!

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com

Nov 18 '05 #2
Thanks. I should have thought of the term URL Rewriting. That's what I
needed!
-mike
"apple" <ap***@beep.ru> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Michael, you need to use HTTPModule for intercept and web requests.
first you need parse request string for extract all needed parameters, then retrieve data from database and next RewritePath of Context class
here is samples
http://www.aspnetpro.com/NewsletterA...200309pj_l.asp http://www.15seconds.com/issue/030522.htm
and this about IIS settings
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

hope this help

"Michael Mayer [C# MVP]" <mi**@mag37.com> wrote in message
news:ew**************@TK2MSFTNGP10.phx.gbl...
I want to create a "virtual" directory (not and IIS virtual directory,

which
really seems to just be a link to a real directory) where the contents of that directory can be read from a database.

That is, right now I have a webform that can read an article out of a
database, with a url something like:
http://some-domain/article.aspx?id=1

I'd prefer to have a url like:

http://some-domain/articles/CoolArticle.html

where some application (dll, webform, http handler?) takes any url in the path /articles/ and uses the "CoolArticle.html" title to find the file in the database. I know the db side, just not the web side.

Thanks in advance!

--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/
mi**@mag37.com


Nov 18 '05 #3

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

Similar topics

4
by: Mark Hoagland | last post by:
I've got a scenario with a web application where I must access the virtual directory being accessed from within the Application_OnStart event handler. Specifically, I have a series of IIS virtual...
3
by: pleaseHelp | last post by:
To better manage our secure site we just separated the registration and checkout sections of our web into separate virtual directories. These new virtual directories are on the same server as the...
1
by: Dennis | last post by:
Hi, I have a doubt about uploading ASP.NET web application from development computer to web server. Is there any way to store the ASP.NET web application in the server's virtual directory that...
10
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77...
8
by: And | last post by:
Hi everyone my database is in a folder inside the inetpub folder (c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside the wwwroot folder. My question is: Is there a way...
0
by: Lasse Nilsson | last post by:
Hi all, I've got a deployment issue I hope is solvable at all, and appreciate all help anyone can give me. We've got an ASP.NET-application (a sort of function library shared by our customers,...
8
by: Nate | last post by:
I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to have a Virtual Directory running an application in 1.1. I have configured each in its own Application Pool. The 1.1...
1
by: mbosco51 | last post by:
Hi. I have an external facing website that has both a customer login and an admin login. I want to prevent external access to the admin login for security reasons. On the same webserver I...
5
by: Ned White | last post by:
I have set up a virtual directory on ISS 6.0 to store the all .jpg and .swf files which i use in my project It is alias name is "OutSrc" Is it possible to acquire a list of files which exist in...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.