[Mono-list] mod-mono problem

dedi mdedirudianto at gmail.com
Mon Apr 25 01:54:35 EDT 2011


Oh, I think I found the problem.
I put this config then it works :)

MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd
MonoApplications "/:/srv/www/htdocs"

Eventhough I'm not sure why it should be like that.

Regards,
Dedi

On Mon, Apr 25, 2011 at 12:04 PM, dedi <mdedirudianto at gmail.com> wrote:
> Hi guys,
>
> I cannot run my asp.net page on the server's root (http://localhost)
> It always show me to download the asp.net page instead of opening it.
> Which the mime type is: application/x-asp-net.
> But, I it works fine if I use virtual path (http://localhost/test)
>
> I'm not sure what's wrong.
> I checked using "wget --server-response -O /dev/null http://localhost/"
> and the result is:
>
> localhost------------------------------------------------------------------------------------------------------------
> Resolving localhost... ::1, 127.0.0.1
> Connecting to localhost|::1|:80... connected.
> HTTP request sent, awaiting response...
>  HTTP/1.1 200 OK
>  Date: Tue, 27 Jul 2010 21:07:36 GMT
>  Server: Apache/2.2.15 (Linux/SUSE)
>  Last-Modified: Tue, 27 Jul 2010 17:39:01 GMT
>  ETag: "e31fb-33-48c61fa021740"
>  Accept-Ranges: bytes
>  Content-Length: 51
>  Keep-Alive: timeout=15, max=100
>  Connection: Keep-Alive
>  Content-Type: application/x-asp-net
> Length: 51 [application/x-asp-net]
> ------------------------------------------------------------------------------------------------------------
>
> And the other site using: wget --server-response -O /dev/null
> http://localhost/test
> The result is:
>
> localhost/test------------------------------------------------------------------------------------------------------------
> Resolving localhost... ::1, 127.0.0.1
> Connecting to localhost|::1|:80... connected.
> HTTP request sent, awaiting response...
>  HTTP/1.1 301 Moved Permanently
>  Date: Tue, 27 Jul 2010 20:52:49 GMT
>  Server: Apache/2.2.15 (Linux/SUSE)
>  Location: http://localhost/test/
>  Content-Length: 309
>  Keep-Alive: timeout=15, max=100
>  Connection: Keep-Alive
>  Content-Type: text/html; charset=iso-8859-1
> Location: http://localhost/test/ [following]
> --2010-07-27 14:52:49--  http://localhost/test/
> Reusing existing connection to localhost:80.
> HTTP request sent, awaiting response...
>  HTTP/1.1 200 OK
>  Date: Tue, 27 Jul 2010 20:52:49 GMT
>  Server: Apache/2.2.15 (Linux/SUSE)
>  X-AspNetMvc-Version: 2.0
>  X-AspNet-Version: 4.0.30319
>  Content-Length: 253
>  Cache-Control: private
>  Set-Cookie: ASP.NET_SessionId=F425244603E3C92923A36345; path=/test
>  Keep-Alive: timeout=15, max=99
>  Connection: Keep-Alive
>  Content-Type: text/html; charset=utf-8
> Length: 253 [text/html]
> ------------------------------------------------------------------------------------------------------------
>
>
> The different is that for "localhost", it seems the page was ignored
> by the runtime.
> And for the "localhost/test", it works fine, the page was processed by
> the runtime.
> Here is the configuration of "mod_mono.conf":
>
> mod_mono.conf------------------------------------------------------------------------------------------------------------
> <IfModule !mod_mono.c>
>    LoadModule mono_module /usr/lib/apache2/mod_mono.so
> </IfModule>
>
> <IfModule mod_headers.c>
>    Header set X-Powered-By "Mono"
> </IfModule>
>
> AddType application/x-asp-net .aspx
> AddType application/x-asp-net .asmx
> AddType application/x-asp-net .ashx
> AddType application/x-asp-net .asax
> AddType application/x-asp-net .ascx
> AddType application/x-asp-net .soap
> AddType application/x-asp-net .rem
> AddType application/x-asp-net .axd
> AddType application/x-asp-net .cs
> AddType application/x-asp-net .vb
> AddType application/x-asp-net .master
> AddType application/x-asp-net .sitemap
> AddType application/x-asp-net .resources
> AddType application/x-asp-net .skin
> AddType application/x-asp-net .browser
> AddType application/x-asp-net .webinfo
> AddType application/x-asp-net .resx
> AddType application/x-asp-net .licx
> AddType application/x-asp-net .csproj
> AddType application/x-asp-net .vbproj
> AddType application/x-asp-net .config
> AddType application/x-asp-net .Config
> AddType application/x-asp-net .dll
>
> DirectoryIndex index.aspx
> DirectoryIndex Default.aspx
> DirectoryIndex default.aspx
> ------------------------------------------------------------------------------------------------------------
>
> And here is some of the apache configuration:
>
> ------------------------------------------------------------------------------------------------------------
> DocumentRoot "/srv/www/htdocs"
>
> <Directory "/srv/www/htdocs">
>        Options All
>        AllowOverride All
>        Order Deny,Allow
>        Allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>
> <Directory "/srv/www/cgi-bin">
>        AllowOverride None
>        Options +ExecCGI -Includes
>        Order allow,deny
>        Allow from all
> </Directory>
>
> Include /etc/apache2/conf.d/*.conf
> ------------------------------------------------------------------------------------------------------------
>
> Is there anything I missed?
> Please if anyone know how to solve this.
> Thank you.
>
> Regards,
> Dedi
>


More information about the Mono-list mailing list