This was modified from JLBN, his tutorial focuses on Apache 2.2.x (and is also 12 pages long).

  1. Download this: mod_aspdotnet and install it
  2. Make a new folder in your C:\wamp\www\ folder called ASP.
  3. Open your httpd.conf file in your favorite text editor (C:\wamp\bin\apache\apache2.0.x\conf\httpd.conf)
  4. In the LoadModule section, add this line:
  5. LoadModule aspdotnet_module “modules/mod_aspdotnet.so”

  6. Add this code before “Include “c:/wamp/alias/*”":
  7. <IfModule mod_aspdotnet.cpp>
    # Mount the ASP.NET /ASP application
    AspNetMount /ASP “C:/wamp/www/ASP”

    # Map all requests for /ASP to the application files
    Alias /ASP “C:/wamp/www/ASP”

    # Allow asp.net scripts to be executed in the /ASP folder
    <Directory “C:/wamp/www/ASP”>
    # Set asp.net options
    Options Indexes FollowSymLinks Includes +ExecCGI
    # Set asp.net permissions
    Order allow,deny
    Allow from all
    # Set asp.net default index page to .aspx and .htm
    DirectoryIndex index.aspx index.htm
    </Directory>

    # Set aspnet_client files to serve the client-side helper scripts.
    AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) “C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4″
    <Directory “C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles”>
    Options FollowSymlinks
    Order allow,deny
    Allow from all
    </Directory>
    </IfModule>

  8. Let’s test it. Make a file called simple.aspx in the ASP folder you created, and put this code inside.
  9. <% Dim I As Integer
    For I = 0 to 7 %>
    <font size=”<%=I%>”> Simple ASP.NET TEST</font> <br>
    <% Next %>

  10. Go to your browser and type in http://localhost/ASP/simple.aspx
  11. If you get an error, check to make sure the directory it’s looking for is there and if it isn’t just create it. For me the directory was C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

If I missed something, let me know.

16 Responses to “How to install ASP.net on an Apache 2.0.x WAMP server”

  1. So is this any different for Apache 2.2.11 ?

    I did JLBN method, I just notices you don’t call out the httpd-aspdotnet.conf since you added it in the same httpd.config.

    Either way I still cant get my asp to work on my wampserver. A see the actual code.

    Any sugestions would be greatly appresiated. And thanks for the 12 page brackdown real good.

    • Adam Zwakenberg says:

      It’s not called in httpd-aspdotnet.conf because there is no separate config file for that Apache version (at least the one I tested it on). And if I tried to import it, it would never work right.. So I just hardcoded it to httpd.conf itself.

      There is a different ASP.net version for 2.2 that is on Sourceforge, did you try downloading that instead of the 2.0 version that I linked?

      Are you sure it’s saved as an aspx file? And that it’s set like it is above in the httpd.conf? Sounds like it’s not being read as an ASP file and just reading the code into an HTML file.

  2. Adam thank you for your quick reply.

    Yes I know there is no separated file since you just hard coded it. but in JLBN Method he did actually called it the http-aspdotnet.conf and he loaded it through the httpd.conf. At least this is what I understood.

    Anyways I would like to do it your way. I am currently trying to get asp running in wampserver, apache version is Apache 2.2.11, Yes I did install ASP for apache 2.2. also made sure I had the latest Frameworks. Do i need to have a specific framework ?

    I also hard coded the httpf.conf file with your suggestions.

    I made sure that the file was simple.aspx, inside “C:\wamp\www\ASP\simple.aspx” and i visit the site through http://localhost/asp/simple.aspx and i just get html output with actual asp code.

    Every .aspx, .asp page just spits out html code including the actual asp code.

    I have completely removed and reinstalled everything and still end up with the same thing. maby I should start looking for a different method for this ?

    Any help would be greatly appreciated thanks.

    • Adam Zwakenberg says:

      You’re right, he included it in the httpd.conf file. For some reason, that never worked for me and it never got included, so hardcoded it in the file itself instead.

      Anyways, are you sure the ASP module is running and working? Check the modules tab under WAMP and make sure it is checked and the line loading the module is pointing to the right path.

      Otherwise you’ll get..

      < % Dim I As Integer
      For I = 0 to 7 %>
      ”> Simple ASP.NET TEST
      < % Next %>

      as straight text when you load the page in a browser.

      Other than that, I’m not really sure. Make sure the module is properly installed and working and that you are pointing to the correct paths. I’m assuming you are restarting WAMP after you made the changes too. Apache shouldn’t successfully load if something is wrong in the httpd.conf file.

  3. I do restart Apache.

    In the modules tab under WAMP what name does the module show up as ?

    mod_aspdotnet?

    If so it doesn’t show up on my WAMP module list.

    I did install the mod_aspdotnet in the C:\wamp\bin\apache\Apache2.2.11\ is it in another directory?.

    Maby C:\wamp\bin\apache\Apache2.2.11\modules??

    Thanks again.

    • Adam Zwakenberg says:

      Apache doesn’t see the module then and yes, that’s the correct folder. The file should be called “mod_aspdotnet.so” in that folder.

      If the file isn’t there, then reinstall the module and make sure the installer is set to the correct apache path (it isn’t by default).

      Then make sure that this line..

      LoadModule aspdotnet_module “modules/mod_aspdotnet.so”

      is in the LoadModule section of httpd.conf.

  4. I double checked the httpd.conf file, but like you said it should not load if there is something wrong, and it doesn’t work. ( Thanks for that i always had to re-install wamp )

    So I removed the code you have and it works just fine with ought the asp changes on the httpd.conf.

    I do have a module called mod_aspdotnet.so there for should work fine.

    I cant see what I am missing :( . Maby I am locating the LoadModule aspdotnet_module “modules/mod_aspdotnet.so” some where I shouldn’t ?

    Maby if you could point me on where to locate exactly the following line:

    LoadModule aspdotnet_module “modules/mod_aspdotnet.so”

    I am currently puting it under: LoadModule php5_module “c:/wamp/bin/php/php5.3.0/php5apache2_2.dll”

    Does this count as the LoadModule section of the httpd.conf?

    • Adam Zwakenberg says:

      Yes under that line is the right place.

      I don’t know what else to tell you :( . It sounds like the module isn’t installed properly.

  5. Adam, it wont work. ASP is just not for my WAMPS I guess. I only wanted ASP for some support while I changed some stuff to PHP and MySQL

    Anyways I do have one last question. Could WAMP be used to manage a collage website and be stable on a actual server 24/7?. I currently maintain this collage site that is all ASP and yeah it needs upgrades.

    Just a thought since its actually really good.

    • Adam Zwakenberg says:

      I use WAMP to host business enterprise sites. The only thing I haven’t got working is SSL/HTTPS. Other than that, I’ve had no problems using WAMP as a server.

  6. Very nice, well thanks for your help I appreciate everything.

    Great site by the way !

  7. For everyone experiencing issues when WAMP works with an original httpd.conf but not with the edited. Make sure that the quotes, and with that I mean the rabbit ears, ” are not formatted. That really screwed things up for me, it was just a simple search and replace for all strange ” characters (could be characters from another keyboard layout or something than for others).

  8. I have one problem. Where exactly i have to install the thing from 1.? I tried it every where on m wamp server. But it says that this is the wrong path.

    • Adam Zwakenberg says:

      I’m pretty sure it’s your Apache install.

      In my case its

      C:\wamp\bin\apache\Apache2.2.11

      So maybe try that? Hope that helps.

  9. Valuable information you got here! I would like to thank you for the nice stuff you post!! Thumbs up

Leave a Reply