Configuring ASP.NET MVC2 on Apache 2.2 using mod_aspdotnet

Posted by user40684 on Server Fault See other posts from Server Fault or by user40684
Published on 2010-04-15T19:11:12Z Indexed on 2010/04/15 19:13 UTC
Read the original article Hit count: 814

Filed under:
|
|
|

Trying to get an MVC2 website to run on Apache 2.2 web server (running on Windows) that utilizes the mod_aspdotnet module. Have several ASP.NET Virtual Hosts running, trying to add another. MVC2 has NO default page (like the first version of MVC had e.g default.aspx). I have tried various changes to the config: commented out 'DirectoryIndex', changed it to '/'. Set 'ASPNET' to 'Virtual', will not load first page, always get: '403 Forbidden, You don't have permission to access / on this server.'

Below is from my http.conf:

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 /MyWebSiteName "D:/ApacheNET/MyWebSiteName.com"
 Alias /MyWebSiteName" D:/ApacheNET/MyWebSiteName.com"

 <VirtualHost *:80>
 DocumentRoot "D:/ApacheNET/MyWebSiteName.com"
 ServerName www.MyWebSiteName.com
 ServerAlias MyWebSiteName.com
 AspNetMount / "D:/ApacheNET/MyWebSiteName.com"

# Other directives here
  <Directory "D:/ApacheNET/MyWebSiteName.com">
    Options FollowSymlinks ExecCGI
    AspNet All
   #AspNet Virtual Files Directory
    Order allow,deny
    Allow from all
    DirectoryIndex default.aspx index.aspx index.html
   #default the index page to .htm and .aspx
  </Directory>
 </VirtualHost>

 # 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>

Has anyone successfully run MVC2 (or the first version of MVC) on Apache with the mod_aspdotnet module? Thanks !

© Server Fault or respective owner

Related posts about mvc

Related posts about apache