You are here:About>Computing & Technology>Delphi Programming
About.comDelphi Programming
Setting up the BDSWebExample Delphi 8 (ASP.NET) demo application
Page 2: Configuring the virtual directory on a web server - using IIS and/or Cassini.
 More of this Feature
• Page 1: Restoring the DB
 Join the Discussion
"Post your views and comments to this chapter of the free ASP.NET Delphi Programming Course"
Discuss!
 Related Resources
• A Beginner's Guide to Asp.Net Programming for Delphi developers.TOC

 Elsewhere on the web
• MS SQL Server
• MSDE
• Cassini Web Server

Ok, we now have a database for the BDSWebExample set up. Our next task is to create a virtual directory.

IIS, virtual directory, Web Server?
ASP.NET Web forms (pages) use HTTP to communicate between the browser (client) and the Web server. As stated in the first chapter of this course, ASP.NET Web Forms are text files with a ".aspx" file extension. When a user first accesses the Forms page over the web, ASP.NET generates a compiled DLL file that then dynamically generates HTML output for browsing - deployed throughout an IIS virtual root directory tree.

Most Web designers/developers start out by learning client-side technologies like HTML, JavaScript, CSS, etc. When a browser requests a web page created with client-side technologies, the Web server simply serves the (HTML) files that the browser requests.

Server-side technologies like ASP.NET are different. The code in the ASP.NET Web page is read by the server and used to dynamically generate standard HTML (and JavaScript, CSS, ...) that is then sent to the browser.

Using IIS (Internet Information Server)
IIS is an optional Windows component in non-server operating systems (Win XP Pro, Win 2000 Pro, etc). You can use Control Panel's Add or Remove Windows components to install IIS.

The next steps show you how to mark a directory as an (web) application root directory using Internet Information Services (IIS). Note: the steps show how to build a virtual directory for the BDSWebExample application.

1. Run IIS (Start - Run - inetmgr.exe)
2. Expand the local computer node, expand Web Sites.
3. Right click "Default Web Site", select "New - Virtual directory"

IIS - new virtual directory

4. In the "Virtual Directory Creation Wizard", click Next.
5. Enter "BDSWebExample" in the Alias edit box, then click Next.
6. Enter "C:\Inetpub\wwwroot\BDSWebExample" (note that the original code is in "C:\Program Files\Borland\BDS\2.0\Demos\DB\ASPPortal\BDSWebExample") for the web site content directory, then click Next.
7. On the "Access permissions" page click Next. Then we're done (click Finish).

BDSWebExample in IIS

Using Cassini
If you do not have IIS installed, you can use the Cassini web server that ships with Delphi.

After you have compiled the Cassini web server, you can start it by running the CassiniWebServer.exe in the "C:\Program Files\Borland\BDS\2.0\Demos\Cassini" folder.

"Applications directory" should point to "C:\Inetpub\wwwroot\BDSWebExample", leave the "Server Port" on 80, set "Virtual root" to "/BDSWebExample":

BDSWebExample under Cassini

Running BDSWebExample!
Finally, we are ready to run the BDSWebExample for the first time - note that we have not used Delphi today.

If you are using IIS, simply start your browser, and in the address bar write "http://localhost/bdswebexample/default.aspx" ...
If you are using Cassini, hit the "Start button" - then "click to browse: http://localhost:80/bdswebexample" (and the browser will be opened for you). You'll get the directory listing, find the default.aspx link and click on it...

This is what you should see (browse around, get accustomed with the pages):

BDSWebExample running in IE

That does it! Luckily this is the *last* time you'll need to restore the database, and create a virtual folder (all manually) in this course :)

To the next chapter: A Beginner's Guide to ASP.NET Programming for Delphi developers
If you need any kind of help at this point, please post to the Delphi Programming Forum where all the questions are answered and beginners are treated as experts.

First page > Restoring the database > Page 1, 2

A Beginner's Guide to ASP.NET Programming for Delphi developers: Next Chapter >>
>> What makes an Delphi 8 Asp.Net application

From Zarko Gajic,
Your Guide to Delphi Programming.
FREE Newsletter. Sign Up Now!
Newsletters & RSSEmail to a friendSubmit to Digg
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.