IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Prism
Search Prism Group:

Advanced
-Collapse +Expand Prism To/From
To/FromCODEGuides
-Collapse +Expand Prism Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Prism Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi PrismDelphi for ....   Print This    All Groups  
  From the November 2008 Issue of Prestwood eMag
 
Prism Delphi for .Net Archive:
Learning ASP.NET with Delphi - setting up Cassini Web Server
 
Posted 14 years ago 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.

KB100366

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:
http://delphi.about.com/od/aspnet/l/aa030904a.htm

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) {
                _conn.WriteErrorAndClose(403);
                return;
            }
*/


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.



Comments

1 Comments.
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 105 days ago
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P147A1
Enter key:
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

 KB Article #100366 Counter
146082
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2020 Prestwood IT Solutions.   [Security & Privacy]