Ohad's Blog

Lets talk about .net !

Mirror at:
blogs.microsoft.co.il

News

         Ohad Israeli's Facebook profile

Grab this badge here!

C# Code Snippts

Favorite Blogs

Israeli .Net Bloggers

How to make Apache run ASP.NET / ASP.NET 2.0

Don’t ask me why… but i’ve been asked to make Apache run ASP.NET.

IT Worked !

Even worked with ASP.NET 2.0 Site !

Following are the instruction to make Asp.Net work under apache:

– Install Apache 2.0.54

– Install Mod_AspDotNet

– Add at the end of C:\Program Files\Apache Group\Apache2\conf\httpd.conf the following lines

#asp.net
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo

<IfModule mod_aspdotnet.cpp> 
  # Mount the ASP.NET /asp application
  AspNetMount /SampleASP "c:/SampleASP"
  #/SampleASP is the alias name for asp.net to execute
  #"c:/SampleASP" is the actual execution of files/folders  in that location

  # Map all requests for /asp to the application files
  Alias /SampleASP "c:/SampleASP"
  #maps /SampleASP request to "c:/SampleASP"
  #now to get to the /SampleASP type
http://localhost/SampleASP
  #It'll redirect
http://localhost/SampleASP to "c:/SampleASP"

  # Allow asp.net scripts to be executed in the /SampleASP example
  <Directory "c:/SampleASP">
    Options FollowSymlinks ExecCGI
    Order allow,deny
    Allow from all
    DirectoryIndex index.htm index.aspx
   #default the index page to .htm and .aspx
  </Directory>

  # For all virtual ASP.NET webs, we need the 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>
#asp.net

– Create a directory c:\SampleASP and insert in it the index.aspx

– Restart apache server :
   Start->
 Apache HTTP Server 2.0.54 ->
   Control Apache Server -> Restart

– Open Explorer and navigate to http://localhost/SampleASP/index.aspx

If everything worked fine you should get a nice asp.net page working.

 — index.aspx —

<%@ Page Language="VB" %>
<html>
   <head>
      <link rel="stylesheet"href="intro.css">
   </head> 
   <body> 
       <center> 
       <form action="index.aspx" method="post"> 
           <h3> Name: <input id="Name" type=text> 
           Category:  <select id="Category" size=1> 
                          <option>One</option>
                          <option>Two</option>
                          <option>Three</option>
                      </select> 
           </h3> 
           <input type=submit value="Lookup"> 
           <p> 
           <% Dim I As Integer
              For I = 0 to 7 %>
              <font size="<%=I%>"> Sample ASP.NET TEST</font> <br>
           <% Next %> 
       </form> 
       </center> 
   </body>
</html>

Comments

Keyvan Nayyeri said:

# September 11, 2005 11:14 PM

chalo said:

Thak you !! Your sample worked nicely...
# September 15, 2005 1:19 AM

Jesse H said:

Not working for me. During installation process of Mod_AspDotNet, I get popup messages "Internal error 2908" and "Error 1935. An error occurred during the installation of assembly." Any ideas?
# October 4, 2005 7:58 AM

Xwardox said:

Thanks, your sample works fine.
I will now try to get my own asp pages back on line with Apache.
# October 10, 2005 1:20 PM

Rick N said:

This installer package does not work with Apache 2.2  Apache renamed thier file sturcture and when I browse/navigate to the installed version of Apache I get an error that the location is not a valid installed version of Apache.
# May 24, 2006 2:16 PM

T said:

works like a charm :)


Thank you!
# May 24, 2006 5:19 PM

Maneesh Kumar said:

Its works like Charm!!
# May 26, 2006 1:02 PM

hb said:

Fantabulous! It worked smoothly with  apache_2.0.58-win32-x86-no_ssl.msi!

Thanks a lot.


# May 29, 2006 5:16 AM

forced sex said:

Wellcome to the real world.
# June 6, 2006 8:20 PM

Reaction said:

I also downloaded APACHE apache_2.0.58-win32-x86-no_ssl.msi and it does not seem to work on mine. I get an error 404 when I try to get the page. Can anyone help me make it work?
# June 16, 2006 9:52 PM

Andy Upton said:

I just can't get mod_aspdot net to work!!! The error I'm getting from the webserver is [Mon Jun 19 11:09:41 2006] [error] [client 84.43.73.176] mod_aspdotnet: No AspNetMount URI for request: /Default.aspx Despite configuring httpd.conf! Any help would be great!
# June 19, 2006 6:17 AM

Greg said:

How could you modify this to allow ASP to work in two seperate folders? say: E:\Program Files\Apache Group\Apache2\htdocs (which currently works fine, but I want to also have asp pages in the next one too). E:\Program Files\Apache Group\Apache2\htdocs\uploads I tried aspmounting and aliasing to a different folder and writing that directory code again but no luck, says the page is forbidden. Any help would be appreciated, thanks.
# June 22, 2006 11:29 PM

Henry said:

it works with apache 2.0.58 too! i can view the page however dont' know why i'm not able to use it with visual studio on ASP.NET 2.0 developement
# June 27, 2006 4:35 AM

Marconi (philippines) said:

this is very cools works really geat... for those who try to install the Mod_AspDotNet and get an error, you get an error because your systems doesnt have atleast 1.1 .NET framework. download it in microsoft and try installing it again... i even try to install it togethere with WAMP SERVER and presto....!!!
# July 7, 2006 2:07 AM

Jeff said:

Will this work on xp home edition? I assumed it would, this is the reason I was searching for this because I have xp home... I get Forbidden You don't have permission to access /index.aspx on this server. Message when I try and run that sample aspx page.. I have no idea why, it is the same perms as the index.php file and that works fine... Anyone have any ideas why I am getting a 403? Thanks Jeff
# July 9, 2006 8:35 PM

Leop said:

asp.net generally works ok with this setting, except atlas -- so far i had no luck with atlas
# July 12, 2006 1:04 AM

Ricardo said:

Congratulations Ohad ! The article is very good, but i try use the Treeview and the menu of ASP.NET 2.0, and thins objects don´t work in Apache..... This problem is resolveble ? (Sorry but my English is very bad !!!)
# July 12, 2006 4:06 PM

MediaMaster said:

It works just make sure that you put every portion of the code in its proper spot in the conf file or else it wont work. This tutorial is very simple if you actually read through your conf file. Just pasting the code as a block wont work.
# July 15, 2006 2:23 AM

Chris Love said:

I guess I sturggle trying to figure out why you want to go through all the extra headaches to put something on a platform it was not designed to work optimally. Windows 2k3 is just too cheap to spend all this extra time and $$$ on Apache.
# July 15, 2006 3:17 PM

huso oz said:

asp.net work thnks
# July 15, 2006 9:24 PM

Krazyone said:

I got it working but no matter what it throws tons of errors in my apache logs as well as Windows Event Viewer... Also it causes apache to restart every 30 minutes.. Doesnt hurt my hosting but it still has a lot of work until its fully stable.. I still enjoy using it and it works very well for DOTNETNUKE... I notice the person above me making comments about why... I will tell you. I host PHP Website mainly but now i can support ASP.NET using 1 port... 80! In a normal situation you would have to utilize another port for IIS but this gets rid of that headache and allows multi platform to be hosted... Also there is another mod out there for Tomcat w/ hosts ASP.NET called GrassHopper. Havent had much time to install and play with it but should be able to use Apache w/ Tomcat and mod_JK to utilize this in a much more stable environment. My config: - Apache 2.0.55 - PHP 5 - ASP.NET mod - Windows 2003 Server
# July 16, 2006 2:07 AM

Keyvan Nayyeri said:

Ohad shows you simple stepsto run ASP.NET on Apache server. It&rsquo;s applicable for ASP.NET 2.0 , too
# July 16, 2006 2:35 AM

Jeff D said:

Im like reaction,, keep getting 404 error "Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. " Any help would be great :) -Jeff D
# July 16, 2006 7:59 AM

Phil said:

using this mod, how many concurrent users can apache support? iis 5.1 is only like 10
# July 16, 2006 9:48 PM

Lay Wah said:

Haha, it worked perfectly
# July 16, 2006 11:57 PM

Jeff D said:

Ok i finally got it working and can view the index.aspx page at the top.. however, when i try to add my other previous aspx project folders in the SampleASP folder all sort of weird parsing errors occur.. even if i put the pages in the root SampleASP directory.. anyone else has this problem or a resolution to it? thanks :)
# July 17, 2006 1:53 AM

Anon said:

I don't know if this method is considered "production ready", but I'm using it on a production server, after having a panic when IIS stopped working, and had to switch my asp.net app to something else. No problems so far! I am a little conserned about security though, as the asp.net code seems to have full SYSTEM priviliges.
# August 2, 2006 11:23 AM

John_Mac said:

The downloads for Apache and the mod appear to be broken.  When I nav to the sit, that version of Apache and the mod do not exist.   Is it just me?

# December 7, 2006 11:17 PM

John_Mac said:

OK after some additional searching I found the files in the archives.

I am currently running Apache 2.0.55, can I apply the mod and .conf coding to this or does it only work with 2.0.54?

# December 7, 2006 11:36 PM

im said:

It works only to display all controls. but It makes errors "CallBack" and "PostBack" to press "Button controls".

# December 19, 2006 2:10 AM

Orion Blastar said:

I got tired of trying to make mod_aspdotnet working without having 403 and 404 errors, and the dreaded 500 error. I have Windows XP Home Edition SP2 that was preloaded on my laptop.

The Apache Group stopped development of the mod_aspdotnet module for some unknown reason? Maybe Microsoft sued them or threatened to sue?

Why fight with Apache when you can just download WAMP:

http://www.devside.net/server/webdeveloper

Everything you will need as a web developer in one big giant download, and all free (open source free anyway). It includes mod_dotnet and a lot of other things already preinstalled.

Just remember that the Dread Pirate Ninja Orion Blastar told you, because he already fought the battle over this and figured out a way to win.

# December 20, 2006 9:58 PM

Stankiewicz said:

This is a perfect guide!! Wonderful!! Thanks.

# December 30, 2006 2:49 AM

jet said:

anyone got mod_aspdotnet to work with AJAX RC1?

# December 31, 2006 1:04 AM

moredotnet said:

It worked for me too! Though some errors in the log.

cheers!

moredotnet

# January 4, 2007 1:17 AM

papa_smurf73 said:

This kinda worked for me.  Some of the controls on my aspx page are not showing, but at I can see the content surrounding them.  This could be beacuase I am still a noob to all of this.  I installed the apache_2.0.59-win32-x86-no_ssl.msi, and mod_aspdotnet-2.0.0.msi.  If anyone has a suggestion I would certanly appreciate it.

# January 13, 2007 10:34 AM

martin said:

It kinda worked for me, I'd installed all perfectly, without errors at least, but when I try to run the script provided, it does not show what I think it should have, it just shows Sample ASP.NET TEST one

# January 15, 2007 5:25 PM

custom laptops said:

this review is so good..was about to purchase it . thx for your review

# January 16, 2007 1:00 PM

ale said:

i tried to run the script but a horrid access denied error 403 always popped up. What settings do i need to tweak on my webserver to have me run the scripts.

tx

[--Apache/2.0.58 (Win32),PHP version:5.1.4,MySQL version:5.0.22-community-nt--]

# January 22, 2007 8:27 AM

don perry said:

Make sure u have a web.config file in the directory or else u gonna have 403 errors

# January 23, 2007 7:25 PM

don perry said:

I also noticed that ALIAS Folder names are case sensitive. I think they shoudl fix that.

i had /GMT and couldn't pic up http://localhost/gmt/index.aspx

as soon as i changed /GMT to /gmt, it worked

# January 23, 2007 7:43 PM

50742k said:

It works beauty!!!

thanks for this!!

# January 31, 2007 4:30 AM

Awais effikhan2001@gmail.com said:

The server is not in my hand.I have uploaded the asp page and want it should work perfectly.right now it is not working giving the errors of POST method.

Kindly mail me if you have some info abt it.effikhan2001@gmail.com

# February 7, 2007 5:28 AM

Sepehr said:

would this work with newer versions of apache?

# February 8, 2007 7:32 AM

mario said:

the urls do not work

# February 9, 2007 10:06 AM

SeThCoHeN said:

IT work with apache 2.0.59?

# February 11, 2007 3:46 PM

Gerardo said:

I´ve Apache 2.2.3. I can install the mod_aspdotnet, but I can´t start Apache (show the typical msg: the request operation fail!). If I comment the "Loadmodule ...." instruction, starts... This package don´t work with Apache 2.2.3?, what is grong?. Thanks.

# February 13, 2007 1:54 PM

e27 said:

No... Apache 2.2 has a different module system and since it became "abandonware" it won't work with Apache 2.2!

An alternative is the Mono project... googleit!

# March 5, 2007 3:30 AM

e27 said:

I've found mod_aspdotnet on sourceforge.net and it works on Apache 2.2 as well!

# March 5, 2007 9:57 AM

Madhu said:

For Apache 2.2.4, get mod_aspdotnet-2.2.0.2004-snapshot-rev419792.msi. Works just fine for me.

# March 7, 2007 4:50 PM

Josh Stodola said:

Nice Links!!!!  I found the stuff elsewhere thanks to the comments, but geeze!

# March 8, 2007 9:11 PM

Josh Stodola said:

OK, got it installed and running.  When I request the ASPX page, it gives me a white screen that says

"Bad Request"

And thats it.  WTF?

# March 15, 2007 7:15 PM

Joe said:

It works very well. Thanks

# March 19, 2007 9:36 AM

jd nguyen said:

listen up guys. I've figured out how to make mod_aspdotnet also run AJAX. That's right it will run the latest microsoft ajax 1.0 plus all the asp.net 2.0 pages.

version

apache 2.2.4

mod_aspdotnet 2

a test site is here http://www.mstreamxp.com/app/ajax/default.aspx

I need a site to post the step-by-step guide, so if you guys interested shoot me a link

Jet

# March 25, 2007 9:58 PM

jd nguyen said:

i'd like to retract my last post about how to make mod_aspdotnet work with apache because further tests shown that it's not. i was so pumped at the initial progress but it failed.

# March 26, 2007 1:37 AM

rizgar said:

i reach error like ( Invalid elf header)..why

# April 11, 2007 6:12 AM

Michael said:

I'm interested, but there seems to be a problem with your download links pleas check this out...

michael

# April 12, 2007 8:17 AM

Nimrod the soulhunter said:

Thanks for info I really hope this help

# April 18, 2007 11:25 AM

Alex said:

dosen't work for me by restarting apache service with command promt i get following error ...mod_aspdotnet.so is grabled - perhaps this is not an apache module DSO?....

i'm running apache 2.2 on windows vista(probably that .net framework is includid)

# April 29, 2007 9:34 PM

neoprolog » Miss Vindowz üzerinde Apache ve ASP.NET said:

Pingback from  neoprolog &raquo; Miss Vindowz üzerinde Apache ve ASP.NET

# May 18, 2007 6:37 PM

pey said:

when I write localhost/SampleASP/index.aspx in my navigator, it is loading but it execute nothing, it is thinking, why? what I can do it?

cuando escribo localhost/SampleASP/index.aspx en mi navegador, este se queda cargandose pero no sale nada, carga y carga y no aparece nada, ¿porque puede ser?

tengo todo igual que dice arriba

# May 20, 2007 8:27 AM

Assil said:

Do Anybody have any idea about HOW TO MAKE Oracle Application Server run ASP.NET??????? Thanks
# May 24, 2007 2:56 AM

ASP.NET said:

Great post! I did notice that the links to the Apache 2.0.54 and Mod_AspDotNet were broken (may be temporary). Just wanted to give you a heads up.

# July 4, 2007 2:28 PM

Skip Gaede said:

Today I downloaded apache_2.0.59-win32-x86-no_ssl.msi,

mod_aspdotnet-2.0.0.msi, and performed the steps Ohmad's recipe. For my default.aspx website, I copied over the Personal website that Microsoft gives away with Visual Web Developer 2005 Express (which also uses Microsoft SQL Server Express). After restarting the server, the web page miraculously appeared!

That's the good news. In reading the edits for the Apache config file, it assembles a string (for .NET 1.1) that looks like c:\Windows\Microsoft.NET\Framework\v1.1.4322\ASP.NETClientFiles\

The directory contains 3 files: WebUIValidation.js, SmartNav.js, and SmartNav.htm. In the .NET 2.0 tree, also under Framework, there's not an ASP.NETClient directory, nor are there any SmartNav.* files.

So, my conclusion is that the Microsoft sample must be working because it's a .NET 1.1 compatible application.

Hope this helps somebody else...

# July 12, 2007 3:40 PM

Jeff W. said:

So far so good - your configuration instructions worked exactly as described. Will be working with the information you provided to fine tune it to run on my server.

# July 29, 2007 10:32 PM

Leif Mønnike said:

I have WAMP5 v. 1.6.6 - 11/02/2006

from http://wampserver.com which includes:

      Apache 2.0.59

      PHP 5.2.0

      MySQL 5.0.27

      phpmyadmin 2.9.0.3

      Windows XP SP2 plus latest updates

      and runs 3 domains on my personal web-server

I downloaded mod_aspdotnet-2.0.0.msi from

archive.apache.org/.../mod_aspdotnet

- appended the code at the end of my httpd.conf file

 (and changed the two lines C:/Microsoft.NET... to G:/Microsoft.NET... because this is my sys-dir

Created the c:/sampleASP directory and created the

demofile index.aspx in this dir - and pasted the code into it - and saved it.

Then I restarted the Apache server and launced my

InternetExplorer as descriped with entering the address:

localhost/.../index.aspx

- and vourla...

A nice white simple demo page showed up with a look-up

button.

Now I will play with ASP.NET to see if the mecanics works just so nice and easy as this first shut.

Thank You for this facility - I was a little sad to read, that this Apache module is not maintained anymore.

Leif Mønnike

# August 11, 2007 12:28 PM

mark B said:

Thanks a lot!  That was really simple, but I just couldn't seem to find the right info before.

# August 20, 2007 12:23 AM

Jehzeel Laurente said:

Wow, this is very nice, it helped me a lot. I love Apache more than IIS. weeeeeeee!!! Thanks for this, I'll try this out now ^_~

# August 21, 2007 4:38 AM

chris said:

This example worked for c:\SampleASP\index.aspx file!  but I cannot make it work for a VirtualHost

e.g

<VirtualHost *:80>

ServerName www.mywebsite.com

DocumentRoot "c:/SampleASP"

</VirtualHost>

if i try http:\\www.mywebsite.com\index.aspx does not work!

error message:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admoin@hol.gr and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

in log file error message is:

[Tue Aug 28 22:35:41 2007] [error] [client 89.210.168.213] mod_aspdotnet: No AspNetMount URI for request: /index.aspx

can anyone help?

# August 28, 2007 3:49 PM

Sean Delaney said:

Worked first time and like a charm.  it was easy to setup and follow.  now i can run .asp and .aspx along with .php and .py all on Apache 2.2.4, PHP 5.4.1 and .NET 3.0 Framework..

Excellant

Thanks

Sean

# August 29, 2007 7:47 AM

ASP.NET 2 auf Windows/Apache2.2 - Forum Fachinformatiker.de said:

Pingback from  ASP.NET 2 auf Windows/Apache2.2 - Forum Fachinformatiker.de

# September 9, 2007 8:03 AM

Javier said:

Worked like a charm , at the first go. I had to downgrade from apache 2.2.x to 2.0.x to have it up and running. I would appreciate if someone can confirm the mod for aspnet will work anytime soon for 2.2.x apache.

Now my phpBB3 board will get some nice features courtesy of .NET :)

# September 14, 2007 2:00 PM

stefan said:

lol, "Don’t ask me why". Same for me...As weird as it might sound I am also in that position right now. I will even have to setup apache listening on one single IP and having IIS run on the others. Also need asp.net for apache so thank you for your info, Ohad!

# September 26, 2007 3:35 AM

Alli said:

What a hero! Spent ages fiddling around with Apache::ASP and mod_mono/win32 without much joy, then I ran across your little page here and within 5 minutes everything was up and running perfectly. You're a star, thanks :-)

# September 27, 2007 8:27 AM

Jean-Louis said:

Works great with Apache 2.2.6 and mod_aspdotnet-2.2.0.2006 too.  Only issue I had was the

"webform_postbackoptions is undefined" error message when using .NET 2.0.

The work around is to create an empty file named WebResource.axd in your application directory (i.e. c:/SampleASP in the example above) and everything works great after that.

# October 5, 2007 1:26 AM

Razorg said:

Could someone please show me how to make ajax work with this mod?

# October 20, 2007 1:25 PM

TT1 said:

Help with AJAX and Apache is required. Is it working? If yes what are the application requirements (Apache 2.2.6 ??? and what else). Are there any related webpages / examples on the internet? Any help is reallly appreciated.

# October 23, 2007 4:39 AM

Pete Armstrong said:

Loaded the newest file from the Sourceforge page and followed you steps and everything works quite well. Note that the ASP no longer supports the mod_aspdotnet project and the link to the source forge page is at

sourceforge.net/.../mod-aspdotnet

Looks like I can run my active server pages with Apache.

Thanks

# October 24, 2007 5:40 AM

manas said:

worked fine along with mysql/oracle10g in xp/home,downloaded mod_aspdotnet-2.0.0.2006-setup.msi from sourceforge, added mod_aspdotnet.so under apache2/module, xyz.apsx worked. thanks for the tips. regards.Manas

# November 4, 2007 11:41 PM

Carlos A said:

I got asp.net running on apache2.2.

Steps:

Download latest mod_aspdotnet for apache2.2 from sourcefourge.net and Install it.

Open the httpd.conf file located at C:\program files\apache software foundation\apache 2.2\conf\httpd.conf

copy these lines at the end of the httpd.conf file:

LoadModule aspdotnet_module "modules/mod_aspdotnet.so"

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo

<IfModule aspdotnet_module>

 # Mount the ASP.NET /asp application

 AspNetMount /SampleASP "c:/SampleASP"

 #/SampleASP is the alias name for asp.net to execute

 #"c:/SampleASP" is the actual execution of files/folders  in that location

 # Map all requests for /asp to the application files

 Alias /SampleASP "c:/SampleASP"

 #maps /SampleASP request to "c:/SampleASP"

 #now to get to the /SampleASP type http://localhost/SampleASP

 #It'll redirect http://localhost/SampleASP to "c:/SampleASP"

 # Allow asp.net scripts to be executed in the /SampleASP example

 <Directory "c:/SampleASP">

   Options FollowSymlinks ExecCGI

   Order allow,deny

   Allow from all

   DirectoryIndex index.htm index.aspx

  #default the index page to .htm and .aspx

 </Directory>

 # For all virtual ASP.NET webs, we need the 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>

#asp.net

# November 9, 2007 3:57 PM

krishna said:

This is a wonderful guide. I have installed apache with asp support in 10 minutes by the help of this guide.

Excellent work Ohad.

-K

# November 12, 2007 4:27 AM

quick said:

Does it work fine with AJAX?! because it is giving Javascript error ('Sys' undefined) , even though the ScriptResource.axd httphander tag is added.

Please help

# November 14, 2007 9:40 AM

Brent Hewer said:

This works great! Can't believe I can run both ASP and PHP like this...

I installed the latest mod for apache 2.2.4 the only hiccup is I can't go further then the directory tree structure of SampleASP. ie If I have an images sub folder inside here it comes up with a forbidden 403.

(You don't have permission to access /SampleASP/images/ on this server.)

Anybody come across this and figured out a work around?

Thank you in advance.

# November 18, 2007 8:38 AM

James said:

It worked perfectly.  I'm new to ASP and I wanted to know does the extension have to ASPX or can it be ASP?

# November 20, 2007 11:06 AM

snowfiresystemsadministrator said:

If it says in the installer of Mod ASP.NET that the directory is not a valid location, use this version

downloads.sourceforge.net/.../mod_aspdotnet-2.2.0.2006-setup-r2.msi

# November 20, 2007 9:01 PM

asp: servers that can handle? translating? - Webmaster Forum said:

Pingback from  asp: servers that can handle? translating? - Webmaster Forum

# December 1, 2007 2:05 PM

Mike said:

I'm trying to get this working with Apache 2.2, .Net 2.0, Win Server 2003 64-bit enterprise.  Does this support authentication ok?, and virtual servers?

I've tried the reverse proxy approach (having Apache send the request to IIS, with ProxyPass and ProxyPassReverse), and running into problems with errors such as "WebForm_PostBackOptions is undefined" (non ajax pages) and "Sys is undefined" (for ajax pages), quite frustrating since these pages all work fine when running under native IIS (need apache to host a separate tomcat site).

# December 6, 2007 5:14 PM

Rodney said:

It appears that the .msi installer you can download from SourceForget does not support .NET 2.0, only 1.1.

There is a source file you can download that is suppose to support .NET 2.0, but I don't have the means to compile it.

Anybody know where I can get binaries for the .NET 2.0 version of mod_aspdotnet?

# December 19, 2007 2:24 PM

Zohaib said:

I am unable to install mod_asp.net latest version on apache 2.2.6. I am currently using latest version of Wamp. Any help is highly appreciated.

# December 29, 2007 7:42 AM

BlackZhadow said:

TreeView under Mod_AspDotNet:

Snip (weblogs.asp.net/.../424852.aspx)

------------------------------------------------

When using server (ASPDOTNET 2.0) genrated controls (TreeView in particular), Apache can't find WebResource.axd which is a phantom file used in the callback functionailty of the 2.0 platform. Server generated graphics and javascript does not work properly in the resulting pages. (i.e. the little node icons don't appear and the JavaScript Debugger in IE reports all kinds of Script errors)

I did find a fix, that was to create an empty file in the Application Directory and call it WebResource.axd as the DotNet Platform doesn't really read the file at all. After that, DotNet 2.0 ran perfectly with Apache 2.0.55 And Mod_AspDotNet 2.0.

Example: Supposing in my httpd.conf I have the following lines to map a folder as an ASP

App: ## Begin HTTPD.CONF AspNetMount /app "C:/HTML/app" Alias /app "C:/HTML/app" ## END HTTPD.CONF I then make a new file in the folder "C:\HTML\app" and call it

"WebResource.axd".

------------------------------------------------

# January 2, 2008 2:47 PM

Nalum said:

Has anyone else come across this error?

apache.exe: Syntax error on line 523 of C:/xampp/apache/conf/httpd.conf: API module structure `aspdotnet_module' in file C:/xampp/apache/modules/mod_aspdotnet.so is garbled - perhaps this is not an Apache module DSO?

# January 7, 2008 12:07 PM

Matthew said:

Thanks!  Worked like a charm after a permissions error.

# January 7, 2008 12:38 PM

SharpMap on Apache « GeoMusings said:

Pingback from  SharpMap on Apache &laquo; GeoMusings

# January 7, 2008 2:10 PM

Murad said:

Hi all

I have different .net frameworks installed

and i use v2.0.50727

What should i do ?

BR

# January 24, 2008 4:50 AM

Bobby said:

I saw carlos stated he got his working on Apache 2.2  I tried following his instructions and after everything, I couldn't get apache to restart. Has anyone gotten this to work on Apache 2.2.6? I currently have WAMP 2.0

Any help on this would be great... if so.. you can email me at groundzero2010@gmail.com

Thanks :D

# January 25, 2008 10:29 PM

Nick said:

Hello,

I am experiencing the same issue that 'Quick' had posted regarding Ajax.  I get an the dreaded 'Sys' is Undefined error. Has anyone had any success in getting an ajax asp.net site running on Apache?  What was the magic bullet?

# February 4, 2008 12:37 AM

Nick said:

hmm... my take away is that this does NOT actually work.  If you are running an overly simplistic application like 'Hello World' you will have success, but once you enter the realm of ajax based applications, forget about it.  Asp.Net was built for IIS, as much as people may dislike that fact.

# February 4, 2008 11:22 AM

Orville's Blog said:

# February 6, 2008 6:31 PM

ekeko said:

Hello,

I installed it without problems but I have CruiseControl.Net running and when I try to go after dashboard (details on a task) I go to nowhere since the server wants to get into ccnet\dashboard\local\server and so on.. any idea what can I do to solve this?

thanks for any help1

Pablo  - ekekoATgmx.net

# February 6, 2008 9:32 PM

chelah said:

I followed Carlos steps for Apache 2.2. It works in Vista after I cleared a permission error. The error said that it didn't have permission to write to "Temporary ASP.Net Files" folder. Actually it just couldn't create the folder. I just manually create it and it works!

# February 7, 2008 3:31 PM

Mixter Malcom said:

# February 8, 2008 8:36 AM

alloyking said:

Note:

(AspNetMount /SampleASP "c:/SampleASP" ) the above path will need to be set to your actual folder.

In my case I have C:/wamp/www/SampleASP.   Make sure your config follows this correctly.

Alloy

# February 21, 2008 8:20 PM

AbrahamA said:

Excellent! Praise at your work.

Thank you for sharing your knowledge.

Keep up the great work.

# February 23, 2008 7:32 AM

Informit said:

Hi,

-> we are using Microsoft.Web.UI.WebControls Treeview with .net 1.1, Apache 2.2 but when we run appln in IE treeview doesn't work. can you please help to solve the issue? I read other comments but didn't get any idea...

-> Is there any visual interface like IIS for apache?

# February 28, 2008 6:21 AM

interGhost said:

Hmm,  I get the sample to work fine... call up a database and feed variables into a datalist with javascript.  However, when I change to an actual directory (substitute the actual directory name with the exact same files I had in the sample) it says it is Forbidden.. 500 error I think.. any thoughts?.. I really dont want to have to put all these asp.net app directories in my C:\ root

thanks

# February 28, 2008 3:02 PM

HART said:

Whats the point of running ASP on apache in Windows iso IIS?

# March 7, 2008 4:36 AM

interGhost said:

I am having trouble getting the mod_aspdotnet.so to work on more than one virtual host application..  I can get it to work if I forward the url to the alias dir (like mysite.com/CartRootDirectory ...then follow link to aspx page) but not like this (CartRootSite.com ...then follow link to directory.)

I would use url forwarding to fix this (to utilize url masking) but since I also run an email server the forwarding messes with the mx records. The mod works great tho.. I probably am just missing a small detail with the Virtual Hosting Part..  the mod works with a virtual host when I load it like this:

AspNetMount / "C:/Clients/website/aspapp"

But not this:

AspNetMount /aspapp "C:/Clients/website/aspapp"

/aspapp is my alias for the directory.

Any Help would be appreciated. Thanks

# March 9, 2008 9:10 PM

chris c said:

I am running WAMP2/Apache 2.2.x.  A link to the .msi can be found here: www.apachelounge.com/.../viewtopic.php

Everything seems to work great.  

# March 10, 2008 11:34 AM

Lewis said:

This is an excellent tutorial, im making some adjustments to the shared module, so I can have a server on a pendrive, plug it into any pc and run, +++rep to you

# March 12, 2008 3:50 AM

prabhat singh said:

I am using Wamp 5. When I tried to install mod_aspdotnet.msi , it asks for apache root folder. My apache is installed in C:\wamp\bin\apache\apache2.2.6 .

But it giving an error message and I am not able to install it.

Please suggest what to do now?

Thanks a lot.

# March 12, 2008 3:35 PM

New Computer and New IIS problems with Windows Vista - Code Forums said:

Pingback from  New Computer and New IIS problems with Windows Vista - Code Forums

# March 15, 2008 7:41 AM

Eamonn Dunne said:

Quality post cheers :)

# March 15, 2008 11:29 PM

Sree said:

Hi all,

This is an excellent post. It's working perfectly except for one issue. I have different Dot net versions installed and what we use is v2.0.50727. What changes needs to be done in the httpd conf file for this ? Any help would be highly appreciated.

Regards

# March 17, 2008 12:24 AM

Cyril Sokolov said:

Thanks a lot for the great post and sample. It really works!!! Thank you!

# March 19, 2008 4:11 PM

Franck David LOKOSSI said:

Simple, nice and very usefull article.

After half an hour of configuration my WAMP Server runs ASP.Net 1 and 2 pages well.

Excellent !!!!!!

Thank you for your article. ;)

D@vid LKS.

# March 19, 2008 6:20 PM

Tony said:

If you are getting the dreaded sys error with ajax, you have to had a blank file to you app directory called ScriptResource.axd  and as mentioned in a earlier post you also need WebResource.axd, then everything works just fine.  I am sure these small issues are related to the fact that mod_aspdotnet does not support .net 2.0 officially yet.

# March 20, 2008 2:34 PM

ron said:

ok i dont know what to do  .

its work but i need that it will work with *.asp and not aspx . what i need to do that it will work

# March 26, 2008 2:42 PM

robert said:

can ajax runs on apache, can any one help

# March 26, 2008 10:57 PM

Phoenix said:

THX! very cool, work excelent

# March 30, 2008 6:33 AM

Angelo said:

only works with IE Navigators, with mozilla.

asp.net code, is dont parsed..

# March 31, 2008 7:52 PM

Peter said:

This is great, worked for me, but what about regular asp, is there a similar way to get ordinary asp to work as well

# April 1, 2008 7:22 AM

juanalo said:

Great work and lot´s of thanks.

I´ve tried this solution with the next versions:

apache_2.0.63 no-ssl

mod_aspdotnet-2.0.0.2006

Now I´ve achieved AJAX working with apache. I used www.magicajax.net . To get it working, I putted an empty file with the name  WebResource.axd in the app dir and it worked.

# April 3, 2008 5:26 AM

fapoli said:

Any suggestions for running an ASP.NET AJAX enabled website in Apache? The page runs great but without AJAX.

# April 4, 2008 1:00 PM

darcy.yang said:

I cann't get Installar file"Apache 2.0.54" and "Mod_AspDotNet"

# April 7, 2008 3:18 AM

lxz cn said:

working now!!!   thank you!!!! but it can not running in allow of apache 2.2.4!!!warning

# April 8, 2008 2:49 AM

juanalo said:

Hello, lots of thank for this wonderfull solution!!

I installed Apache 2.0.63, with mod_aspdonet 2.0.0.2006 and It runs perfectly.

Now, I´ve made run Ajax in the server using magicajax (http://www.magicajax.net/) and It worked. You need to add an empty file with the name WebResource.axd.

# April 8, 2008 10:36 AM

Gaja said:

Please tell me whether ASP.NET work with Apache 5.x

# April 11, 2008 2:23 AM

Pierre Michel said:

Very nice... works fine under xampp in windows vista....

# April 15, 2008 12:48 AM

Prabath Abeysiriwardana said:

Thanks a lot. It works nice !!!!

But the new place to obtain Mod_AspDotNet module is SourceForge.net site - sourceforge.net/.../showfiles.php

(Location given in this web page gives an error.)

# April 18, 2008 1:01 AM

php with asp.net - WebProWorld said:

Pingback from  php with asp.net - WebProWorld

# April 23, 2008 11:00 AM

bhuvana said:

i am getting 500 internal server error . any idea wat it is.

# April 25, 2008 3:39 AM

bhuvana said:

yaar its working fine

# April 25, 2008 3:44 AM

Asrai said:

Thanks alot for this!

# April 26, 2008 8:25 AM

kamoroy said:

Works great. But my ASP menus doesn't work. Any ideas?

# April 28, 2008 3:43 AM

Dan Atkinson said:

Absolutely brilliant!

All evening, I've been looking for ways to extend IIS 5.1 to allow multiple websites to run simultaneously. Finally, I gave up and thought I'd look at Apache. Within 10 minutes, I'd not only installed Apache, but also installed mod_aspdotnet from Sourceforge and tested the sample in my browser!

And now, 30 minutes later, I've ported over every one of my other .NET websites, into Apache, and they're all running happily as ever!

Thanks!

# May 3, 2008 6:32 PM

Axel said:

Hi folks,

works for me out-of-the-box for a .NET 3.5 ASP.NET webservice on

* Windows Vista Enterprise 32bit

* Windows Server 2008 (Standard) 64bit

I used "apache_2.2.8-win32-x86-openssl-0.9.8g" and the "mod_aspdotnet-2.2.0.2006-setup-r2.msi" from sourceforge.

cheers, Axel

# May 4, 2008 5:53 PM

Javiles said:

The Author  of this guide say  "Don’t ask me why." ???...I say "Why Not?" IIS is a crap...so you need to run APACHE if you wan a real WEBSERVER.

For my the author of this page sounds like a NOOB doing something crazy, JAJAJAJAJA Runing ASP.NET on APACHE it's a real basic thing on LINUX.

So, first take your stupid windows machine, IIS and Framework and put it on the trash....Do the following:

- Install Linux (Debian /Ubuntu)

- Install mono

- Open the terminal and write sudo apt-get install xsp2

- Run sudo xsp2

And all work fine....ah, and Write something on PHP if you wana good WEB APPs

And

# May 9, 2008 1:07 AM

h4v0c- said:

setup gives error while checking the apache root directory..

dont know why...

any help????

# May 9, 2008 4:13 AM

Maxim said:

How run aspx files in some directiries of web server, such as /home, /info, e.t.c. But not only with alias Sampleasp?

Sorry for my English. :)

# May 11, 2008 3:56 AM

rohnn said:

It is actually working fine...

Just had to reinstall apache in dir resquested by mod_apsdotnet for its own install.

Having it working on WinXP pro with apache 2.2.8 together with php5.2.6

# May 11, 2008 9:17 AM

apache iis net said:

Pingback from  apache iis net

# May 12, 2008 1:08 AM

dotheweb.net said:

If you want to have a Linux server running Asp.net checkout this tutorial at dotheweb.net:

<a href="www.dotheweb.net/lama">LAMA: Linux - Apache - Mysql - Asp.net - Best of ALL Worlds!</a>

# May 14, 2008 5:19 PM

mohan nautiyal said:

Hi, all

I am able to run my asp.net1.1 website on apache server. but the problem what i am facing is i am not able to open the pdf file from my page, it is giving error like file Corrupted, where as the file is proper. if any one have any idea plz help me out.

Thanks a lot

Mohan

# May 21, 2008 8:05 AM

Maria said:

It seems that you receive several thank you messages every week.

You really deserve them!

Thanks a lot!

# May 24, 2008 4:11 AM

541 said:

Pingback from  541

# May 27, 2008 5:17 PM

vincent said:

hey, thanks, works perfect. more power. i can now run asp on my workstation.

# June 2, 2008 1:15 AM

make net said:

Pingback from  make net

# June 3, 2008 8:15 AM

Runelore said:

Server Error in '/asp' Application.

--------------------------------------------------------------------------------

The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

Please help :)

# June 5, 2008 3:43 PM

Runelore said:

Fix for my last post:

I was getting "does not have write access"

I found that I didnt have a "Temporary ASP.NET Files" folder. I created one and refreshed my page.

WOOT!!!

IT worked, no error!

# June 5, 2008 4:06 PM

shreyas said:

Thanks a lot!

Worked fine

# June 20, 2008 1:21 PM

Darshan Vyas said:

Hey Great Work thanks for the contribution.

Would help people work like who wants to run .Net Web Application on Apache.

It Works Nicely.....

# June 21, 2008 9:52 AM

PO said:

Thanks working on Vista Business with apache 2.2.8

# June 23, 2008 4:23 AM

Chris said:

THANK YOU!! the link doesn't work anymore for the second .msi package but a quick "google" of the name led me straight to a sourceforge download. works like a charm!(i changed the sample directory though)

# June 25, 2008 12:17 AM

how to make a website in asp net said:

Pingback from  how to make a website in asp net

# June 25, 2008 6:00 AM

rexnoctu said:

Thank You!It is working even with .net 3.5

# June 27, 2008 10:04 PM

fuck said:

I'm getting the 500 Internal Server Error Error, what's wrong???

# July 4, 2008 10:55 AM

Articles said:

asp.net generally works ok with this setting, except atlas -- so far i had no luck with atlas also I love the method in which the writer explains the most labored of concepts effortlessly.

# July 5, 2008 4:33 PM

Sayed Mohammad Ahmad said:

Good tutorial,

For those who are running IIS, they should have to either change the port 80 or configure Apache to listen on someother port by modifying httpd.conf

# July 9, 2008 2:38 AM

Computer forWritten » IIS and Apache open to the outside on one machine said:

Pingback from  Computer forWritten &raquo; IIS and Apache open to the outside on one machine

# August 18, 2008 5:25 PM

Chris said:

Is there a way to get apache to launch a default.aspx instead of an index.aspx?

# August 24, 2008 8:08 PM

mushfiq.razib said:

Working smoothly, thanks.

# August 27, 2008 5:32 AM

Al said:

Thanks work perfectly with expressions web and apache 2.2 :P

# August 28, 2008 4:15 AM

zzx said:

It works fine! but How can I run the asp.net 1.1 web application with AjaxPro.dll on the Apache? Thanks in advance.

# September 9, 2008 4:22 AM

my blog / links for 2008-09-09 said:

Pingback from  my blog / links for 2008-09-09

# September 9, 2008 10:01 PM

Not you said:

It works great, but how can you make it so it so it can run from anywhere on the server?

# September 13, 2008 11:16 AM

Ecnal Nosboh said:

Hey - You are DA man! This helped me get ASP.Net up and running (C# in .Net 3.5) within a v. short timeframe. Indebted am I, as I have XP home @ home without IIS (What a Bonus that is actually!) and needed to test some .Net stuff for work. Big-Ups brother!

# September 14, 2008 6:24 AM

thee said:

I'm create website by asp.net 2.0 (v2.0.50727) And Apache for webserver.(– Install Apache 2.0.54 ,– Install Mod_AspDotNet ) But can't run my website .

Help me please !

# September 18, 2008 10:13 PM

justin said:

it works fine with the sample aspx file but when i renamed it to an asp, it did not work anymore. it works only on file with an aspx extension.

# October 1, 2008 9:01 AM

Justin said:

the example works... but can't run other asp pages.

# October 1, 2008 12:09 PM

KK said:

can anyone help me configuring apache with delphi.net in RAD studio 2007....am able to run with asp.net but i dont have an idea to do with delphi.net.....please if u knw reply as soon as possible...its very urgent

# October 7, 2008 2:09 AM

doniking said:

how to make the aspx files work on root dir?

example domain.com/Default.aspx ?

# October 25, 2008 10:41 PM

Galhano 127.0.0.1 » Blog Archive » How to make Apache run ASP.NET / ASP.NET 2.0 said:

Pingback from  Galhano 127.0.0.1  &raquo; Blog Archive   &raquo; How to make Apache run ASP.NET / ASP.NET 2.0

# October 30, 2008 7:43 AM

qingxingmeng said:

我不知道怎么能实现不用虚拟目录,I do not know how not to achieve a virtual directory

# November 6, 2008 12:25 AM

BnoL said:

Thanks for the article, it worked fine for me!

I have 1 question to ask. If I don't want to use the alias ( ex:  Alias /SampleASP "c:/webserver/www", have to type localhost/.../file.aspx to access the asp.net file in my root web folder ) but run it directly ( http://localhost/file.aspx ). What should I do? ( I've tried to replace the /SampleASP with / but it didn't work ). Thanks again.

# November 27, 2008 7:16 PM

suresh said:

thanks for your code. But still i am getting one prob. is i am not able access my database what im using in my asp pages. Is it any further config required to access my database

# November 27, 2008 11:49 PM

Alessandro said:

To make AJAX in ASP.NET 2.0 working on your great APACHE websites, just create 2 empty files in website root folder:

WebResource.axd

ScriptResource.axd

Good work guys.

# December 3, 2008 8:34 AM

ASP with Apache « Ferdinand Kosasih’s Blog said:

Pingback from  ASP with Apache &laquo; Ferdinand Kosasih&#8217;s Blog

# January 5, 2009 3:11 AM

Geoff said:

Has anyone tried this with Apache CE? Specifically, I want to run asmx web services on a CE 6.0 Embedded device running Apache as the web server.

# January 12, 2009 7:31 AM

Vm said:

Hey it's works.....:)

Thanks

Vm

# January 13, 2009 4:50 AM

Salahuddin said:

Is there any way to run asp.net web site on Tomcat web server, as done on Apache web server

# January 13, 2009 6:59 AM

geli said:

hello!

does it also work with the framework 3.5?

cheers geli

# January 19, 2009 5:10 AM

Amir Abdullah said:

IF you found any error message during installation of mod_asp.. then u use the mod_aspdotnet-2.2.0.2006-setup-r2.msi, i have found this at forums.devside.net/index.php

let me know if you have any query...

Thanks to Taking your time

# January 21, 2009 2:28 AM

Mark said:

Thanks Ohad and to all, this worked like a champ for me also.

my win os configuration (test/dev machine):

WAMPServer 2.0f (which includes Apache 2.2.11)

Microsoft .NET Framework Version:2.0.x

i installed mod_aspdotnet-2.2.0.2006-setup-r2.msi in this subdir:

c:\wamp\bin\apache\apache2.2.11

then added the lines recommended above to httpd.conf, with my own test dir (my change).

ran a few test apps ok, .aspx extensions only, older syntax needed to be updated... some help from the debugger. not bad.  everyone got the latest patches?

regarding database access with this, I got a MySQL ODBC driver update from:

dev.mysql.com/.../5.1.html

here's a simple db test access program as my contribution here:

[testodbc.aspx]

&lt;%@ Page aspcompat=true %&gt;

&lt;%

Dim cn = Server.CreateObject("ADODB.Connection")

Dim rs = Server.CreateObject("ADODB.RecordSet")

With cn

 .ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost;" &amp; _

    "DATABASE=yourdb;UID=youruid;PASSWORD=yourpassword;"

 .Open

End With

With rs

 .ActiveConnection = cn

 .Source = "SELECT * FROM yourtablename"

 .Open

End With

Response.Write("&lt;b&gt;" &amp; UCase(rs(0).Name) &amp; " - " &amp; UCase(rs(1).Name) &amp; "&lt;/b&gt;...&lt;br/&gt;")

While Not rs.EOF

 Response.Write(rs(0).Value &amp; " - " &amp; rs(1).Value &amp; "...&lt;br/&gt;")

 rs.MoveNext

End While

rs.Close

rs = Nothing

cn.Close

cn = Nothing

%&gt;

(eof)

hope this helps.

thanks again for the tips. peace out.

Mark, ajamyajax.com

(my free ajax javascript, php site -- no asp there yet)

# January 21, 2009 12:07 PM

Shaez said:

We r using Webspace and have Server Apache 1.3.41(Unix). How to run .aspx pages with Ajax on this server.

# February 3, 2009 3:43 AM

Cara agar Apache dapat menjalankan ASP.NET « Cindy Margaretha’s Weblog said:

Pingback from  Cara agar Apache dapat menjalankan ASP.NET &laquo; Cindy Margaretha&#8217;s Weblog

# February 4, 2009 5:22 AM

Komal said:

It Worked wonderfully , thanks a lot

# February 5, 2009 10:45 AM

Robert said:

Does it work in Linux?

# February 10, 2009 11:05 PM

Dan Hughes said:

Is this what I would have to do in order to run use / run Ajax on an Apache server?

Thanks, Dan

# February 15, 2009 11:18 PM

James said:

worked perfectly. I didn't name my directories your way and didn't deal w/ the default install, but well... it was no big thing but a chicken wing to just make your installation work according to my configuration!

cheers!

oh yeah...

Apache2.2.11

MySQL5.1

PHP5.2.6

just so you know :)

# March 1, 2009 9:27 PM

yawasare said:

After try to get it working this what i got

The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[HttpException (0x80004005): The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]

  System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +671

  System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +160

[HttpException (0x80004005): The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]

  System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +520

  System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +78

  System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +257

# March 11, 2009 10:35 AM

ASP.NET en servidor Apache « Nicol??s Flores said:

Pingback from  ASP.NET en servidor Apache &laquo; Nicol??s Flores

# April 3, 2009 11:19 PM

sababathy said:

Sir any possible to run ASP.NET in LINUX apache tomcat

# April 17, 2009 4:21 AM

javier said:

I'm still working with Apache 2.0.x and the old mod

Now i'm serving ASP.NET in 1.1 , 2.0 and 3.5 flavours.

Not a single glith from day 1 , and i'm using all kinds of asp controls

Probably i'll supercede this with some kind of redirect in the near future with a more modern apache setup to dish-out all the asp load to other machine , but so far , this setup works wonderfully for any personal server with low traffic.

# April 18, 2009 8:05 AM

Zuko said:

I had problems with NT/Authority, but i solved

If someone have any question about it, send mail to fzukian@gmail.com. Thanks !!!!  

# April 18, 2009 1:22 PM

Michel Wilhelm said:

Hey... this works with .asp or only with .aspx ?

Thanks...

# May 5, 2009 3:59 PM

ruts said:

Thanks a lot! I've get it.

# May 11, 2009 1:01 PM

jason said:

The links to apache 2.0 and the asp mod don't work for me (404 error).  Anybody have links that work?

# May 14, 2009 9:16 AM

Marcos said:

I can not show my reportviewer,this is a result error:

The requested URL /.../Reserved.ReportViewerWebControl.axd was not found on this server

I'm using Net Framworks 3.5 and Apache server 2.x on Windows 2003 server

I need your help please..

# May 17, 2009 3:15 PM

matse said:

works great with some minor adjustions (pointing to the right directories)

location of asp-module is now at sourceforge.net/.../mod-aspdotnet

# June 9, 2009 8:28 AM

Leonardo said:

Let me say that this works perfect.

I had 3 hours but when I give up I decide read this blog and Do you know what happened? yeah, I found the solution in this blog.

Thanks a lot to Axel and the owner of this blog.

Solution: I install apache_2.2.8-win32-x86-openssl-0.9.8g" and "mod_aspdotnet-2.2.0.2006-setup-r2.msi, after that I copy/paste the code in the httpd.conf and created the sample directory. I am using Xampp. Now I can use Asp.Net and PHP with the same web server.

It is working fine.

# June 10, 2009 7:35 PM

Leonardo said:

How to create a virtual host for a ASP.NET application that runs at Apache?

Could you please help me?

# June 11, 2009 1:01 PM

aspdotnet on apache | keyongtech said:

Pingback from  aspdotnet on apache | keyongtech

# June 16, 2009 11:07 PM

ari said:

thanks for your post.

i made a try. all ok.

but what if want to rum more then one web app? it is possible?

# June 17, 2009 4:37 PM

Douglas McGregor said:

Excellent, it works!  I've got AppServ on my machine and there was no problem.  Although I haven't done ASP.NET for ages so my memory of it is rusty.  I noticed as well that the Dot Net Framework seems to install by default to Program Files, where as you have C:\Windows.  Now the only thing left to do is see if I can get Classic ASP working.

# July 6, 2009 12:09 PM

Rutger said:

Hi, many thanks for the excellent walkthrough!

# July 16, 2009 10:44 AM

.NET on Apache | Rutger's Corner said:

Pingback from  .NET on Apache | Rutger's Corner

# July 16, 2009 10:46 AM

jeruelx5d said:

It works for me. But how about excluding alias? is it possible?

# July 17, 2009 7:26 AM

Publicar Pagina ASPX - La Comunidad DragonJAR said:

Pingback from  Publicar Pagina ASPX - La Comunidad DragonJAR

# July 27, 2009 9:41 PM

Anoop said:

How can i configure Apache Tomcat 6 for working Asp.net 2005

AnupMadathil

# August 6, 2009 7:24 AM

Wasim said:

@James said it get success at apache2.2.11

can anyoneplz mail me steps to configure it on apache2.2.11

even how to get mod_aspdotnet.so

if you build it then plz mail me

what things i need to install

should i install vc++

should i install .netframe work

and which version of framework ...

will it work with framework3.5

my mail is programec@yahoo.com , programec@gmail.com

thanks...

# August 15, 2009 7:16 AM

David Young said:

This may also be needed in the httpd file:

AspNet Files Directories Virtual

Otherwise, you may get

mod_aspdotnet: Forbidden, 'AspNet Virtual'is not enabled for: /SampleASP/index.aspx

in your error log.  BTW, it does work on Apache 2.2!

# August 22, 2009 3:12 PM

xhoana said:

I have installed asp on my apache server and copy pasted the code above and it seemed to work. But when i open the asp code on browser, the code i've wrote is shown( with html tags). What can i do to make it work?

# August 28, 2009 11:09 AM

Nanda said:

hi..thank u very much... this procedure is perfectly worked for me in apache 2.2...........

;)

# September 7, 2009 3:42 AM

Andrew Osiname said:

worked like a charm on XP Home SP3

excellent so i dont need to upgrade to XP pro to use IIS

# September 9, 2009 9:04 AM

Erwin said:

if I run .asp it will show the code

can I change it if I open .asp file it show as I use .aspx

thx

# September 12, 2009 9:24 AM

David said:

Nice one, Ohad!

Has anyone managed to get this working for Classic ASP?

From what I've read it's not possible with mod_aspdotnet as ASP.net and Classic ASP are two very different beasts...

I've tried Selisoft's ActiveHTML but can't get it working (yet)...

# September 14, 2009 12:37 AM

Alexandria said:

If any reader is getting the following error message when testing "index.aspx":

"The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'"

Please follow the solution found here: http://dotnet.tekyt.info/?p=12. I'll even copy the solution here:

"To correct this, create a folder “C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files” and set permission to write to it."

The above link ain't my site, but it was really helpful to fix such an annoying issue (I did not have to set permissions though, might depend on operating system). Now I'm up and running with ASP.NET on my XAMPP install, using Windows 7 RC. *thumbs up*

# September 23, 2009 1:10 PM

Neo® said:

Hi, I´ve got a small problem with asp.net and localhost. It show me this error: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files has not access to write. Can you help me somebody? Thanks

# October 25, 2009 5:15 PM

shashank said:

Server Error in '/SampleASP' Application.

The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]

  System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +671

  System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +160

[HttpException (0x80004005): The current identity (NT AUTHORITY\SYSTEM) does not have write access to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]

  System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +520

  System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +78

  System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +257

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

# November 14, 2009 12:19 PM

shashank said:

the solution given by Alexandria  is not worked on my windows 7 RTM or i am unable to set permission to write to it.

please can anyone provide me steps to do so.

# November 14, 2009 12:32 PM

amran said:

Hey Bro, Its really Great and working solution for me... Thanks a millions

# November 17, 2009 11:14 PM

Ananya said:

That worked well really.

# November 18, 2009 1:09 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)