From the November 2008 Issue of Prestwood eMag
Prism Delphi for .Net Archive:
Learning ASP.NET with Delphi - setting up Cassini Web Server
Posted 5/1/2006 on 5/1/2006 and updated 1/20/2009
Take Away:

Some initial tips on the road to using Delphi to program ASP.NET web pages.


So I recently began to explore ASP.NET using Delphi as the platform of choice. I found a very good primer to get started on here:

In the article, the steps have you start to use the Cassini Web server, a small "personal" web server written by Microsoft in C#.

As shipped, this server has the limitation of only allowing the local machine to make connections to the web services.  Luckily, this can be easily changed.

1) Load up Delphi 2006 BDS (not just the Win32 version)
2) File | Open...
    [navigate to C:\Program Files\Borland\BDS\4.0\Demos\Cassini]
    [open request.cs]
3) search for the first occurrence of IsLocal, it should be on or about line 93
4) comment out that entire if() block, which controls whether non-local access can occur.  The code should look something like this:

            // Limit to local requests only
/*            if (!_conn.IsLocal) {

5) File | Save
6) Now using a command prompt, build the server with the build.bat file as described in the article.  You should now be able to access the web server via the IP address of the machine it's running on.


Share a thought or comment...
Comment 1 of 1

All the best Learning ASP.NET with Delphi information is here. Some blogs are interesting but some are for gaining knowledge. You should also visit it for refreshment because many articles which are full of thrills are here. In this trustmypaper web, Many of the informative data is available which can guide you to gain the information.

Posted 12/21/2019
KB Post Contributed By Joshua Delahunty:
I am a software engineer with many years professional experience, using everything from 6809 assembly language to C, C++, Delphi, Paradox for Windows, and Borland JBuilder.
Visit Profile For service: 916-726-5675
Copyright (C) Prestwood IT Solutions.
All Rights Reserved.
Printed 12/9/2021