Click here to Skip to main content
13,459,013 members
Click here to Skip to main content
Add your own
alternative version


55 bookmarked
Posted 19 Aug 2002

Cassini and Apache 101

, 19 Aug 2002
Rate this:
Please Sign up or sign in to vote.
This article describes how to get ASP.NET up and running on Apache 2.x for Windows


Cassini is a web server written in C#, you'll find more information about it at

These simple steps gets Apache up and running with ASP.NET

  1. Download and install Apache 2.x for Windows (remember to stop IIS)
  2. Modify the http.conf file:
    LoadModule proxy_module modules/
    LoadModule proxy_connect_module modules/
    LoadModule proxy_http_module modules/
    LoadModule rewrite_module modules/ 
    ProxyPass /aspnet 
    ProxyPassReverse /aspnet 
  3. Create a different catalog (not the /aspnet catalog in http.conf) for your ASP.NET files and start Cassini:
    1. If you are using the cassini server included in WebMatrix
      c:\path-to-cassini\webserver.exe /port:8080 /path:"c:\"
    2. or, the stand-alone Cassini server
      c:\path-to-cassini\CassiniWebServer "c:\" 8080
  4. Test:
    • Cassini: http://localhost:8080/test.aspx
    • Apache: http://localhost/aspnet/test.aspx
    <!--<span class="code-comment"> test.aspx --></span>
    <%@ Page Language="vb" %>
        <form runat="server">
            <asp:Calendar runat="server" />

Ultimate test

If everything is working fine, you can move on to the 'ultimate' test, running ASP.NET Forums on Apache

  1. Do a manual installation of ASP.NET Forums (skipping step 7)
  2. Add to http.conf (assumes the modifications above are done)
    ProxyPass /AspNetForums 
    ProxyPassReverse /AspNetForums 
    ProxyPass /aspnet_client 
    ProxyPassReverse /aspnet_client 
  3. Start 2 different Cassinis listening on port 8081 and 8082.
    c:\path-to-cassini\webserver.exe /port:8081 /path:"c:\" /vpath:"/AspNetForums" <br>
    c:\path-to-cassini\webserver.exe /port:8082 /path:"E:\Program Files\ASP.NET\Client Files" /vpath:"/aspnet_client"

It is not the fastest solution, but everything works fine. I decided to "stress-test" it using Homer running 10 threads 5 sockets per thread in one minute, and got the following:

PageHitsTTFB* Avg.TTLB* Avg.

*: TTFB = Time To First Byte, TTLP = Time To Last Byte

Bear in mind that this test was done on my Thinkpad T21 800Mhz/512 MB, which is filled with junk.

Now I am waiting for someone to write a mod_cassini



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Per S
Web Developer
Norway Norway
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionApache performance Pin
kavithakcross18-Nov-08 17:45
memberkavithakcross18-Nov-08 17:45 
GeneralAnother way Pin
dfer16-Dec-06 23:34
memberdfer16-Dec-06 23:34 
GeneralASP.NET and APACHE Pin
Anonymous12-May-05 3:01
sussAnonymous12-May-05 3:01 
GeneralRe: ASP.NET and APACHE Pin
lcmduck4-Nov-05 1:42
memberlcmduck4-Nov-05 1:42 
GeneralThere is another way... Pin
Ade_V19-Jan-05 12:51
memberAde_V19-Jan-05 12:51 
GeneralThink mod_mono Pin
Neo4E656F29-Oct-04 16:36
memberNeo4E656F29-Oct-04 16:36 
GeneralRe: Think mod_mono Pin
Brian Delahunty16-Feb-05 1:33
memberBrian Delahunty16-Feb-05 1:33 
GeneralDoesn't work for me Pin
Andre S.5-May-04 14:28
sussAndre S.5-May-04 14:28 
GeneralRe: Doesn't work for me Pin
Eron Zebadua27-May-04 10:47
memberEron Zebadua27-May-04 10:47 
GeneralRe: Doesn't work for me Pin
George Dyke7-Jun-04 15:13
sussGeorge Dyke7-Jun-04 15:13 
GeneralRe: Doesn't work for me Pin
jbllama31-Oct-04 6:43
sussjbllama31-Oct-04 6:43 
GeneralRe: Doesn't work for me Pin
glusk8-Feb-05 10:52
memberglusk8-Feb-05 10:52 
Generalcatalog Pin
Anonymous17-Jul-03 5:19
sussAnonymous17-Jul-03 5:19 
GeneralRe: catalog Pin
Anonymous17-Jul-03 5:30
sussAnonymous17-Jul-03 5:30 
GeneralApache and .net Pin
Jake Helfert23-Jan-03 7:00
memberJake Helfert23-Jan-03 7:00 
I recently completed an apache module that wraps and the .net framework. This allows apache to serve .aspx pages natively, w/o IIS or Cassini, etc. It works great.

I am wondering if there is any interest out there for such a beast.

Please send me an email with your opinions.

Jake Helfert
GeneralRe: Apache and .net Pin
yamadhrama14-Apr-03 20:50
memberyamadhrama14-Apr-03 20:50 
GeneralRe: Apache and .net Pin
AlexGnauck8-Mar-04 4:31
memberAlexGnauck8-Mar-04 4:31 
GeneralRe: Apache and .net Pin
arnab197414-Nov-04 18:53
memberarnab197414-Nov-04 18:53 
GeneralRe: Apache and .net Pin
dzCepheus16-Nov-04 13:32
memberdzCepheus16-Nov-04 13:32 
Generalmod_rewrite Pin
Peter Huisman29-Dec-02 11:39
memberPeter Huisman29-Dec-02 11:39 
GeneralStill need Windows server Pin
Trollslayer26-Aug-02 11:41
memberTrollslayer26-Aug-02 11:41 
GeneralRe: Still need Windows server Pin
soderlind26-Aug-02 13:22
membersoderlind26-Aug-02 13:22 
GeneralRe: Still need Windows server Pin
whatever12327-Feb-03 12:46
susswhatever12327-Feb-03 12:46 
GeneralRe: Still need Windows server Pin
msn2wolf1-Sep-04 23:17
sussmsn2wolf1-Sep-04 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180323.1 | Last Updated 20 Aug 2002
Article Copyright 2002 by Per S
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid