Problem on Mono mod installation(mod enables running on linux)

Posted on 2006-05-23
Last Modified: 2012-05-05
1. I use a normal user installed mono runtime,
2. then install mod-mono
3. in apache's config file I add the following line:
LoadModule mono_module modules/
Alias /test "/var/www/html/aspnet"
AddMonoApplications default "/test:/var/www/html/aspnet"
<Location /test >
        SetHandler mono
4. then I restart apache, in its error_log I get the following result:

 [error] Failed running '/usr/lib/pkgconfig/../../bin/mono /usr/lib/pkgconfig/../../lib/xsp/1.0/mod-mono-server.exe --filename /tmp/mod_mono_server_default --applications --port 8079 /test:/var/www/html/aspnet --nonstop (null) (null) (null) (null) (null) (null)'. Reason: Permission denied

and If I access the page through "", get a 503 error[Service Temporarily Unavailable]

I changed to that user, and running the Permission denied code in error_log, seems I can start it without problem, why it failed when running in apache?
Question by:bibu
    LVL 10

    Accepted Solution

    Do you possibly have SELinux enabled?

    Author Comment

    yes, it's the case, We enabled SELinux, and we'll test it again after dinner, hope it will work, I will let you know the result soon:)

    Author Comment

    I think the mod-mono works for apache, now no permission denied message appeared, but could you please shed me a light on why I get the following error when I access the index.aspx?

    Stack Trace:

    System.ComponentModel.Win32Exception: Some sort of w32 error occurred: 0
    in <0x00168> System.IO.FAMWatcher:StartMonitoringDirectory (System.IO.FAMData data)
    in <0x0018c> System.IO.FAMWatcher:StartDispatching (System.IO.FileSystemWatcher fsw)
    in <0x0001a> System.IO.FileSystemWatcher:Start ()
    in <0x00032> System.IO.FileSystemWatcher:set_EnableRaisingEvents (Boolean value)
    in (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:set_EnableRaisingEvents (bool)
    in <0x00127> System.Web.Configuration.FileWatcherCache:.ctor (System.Web.Configuration.ConfigurationData data)
    in <0x0004a> System.Web.Configuration.ConfigurationData:get_FileCache ()
    in <0x00020> System.Web.Configuration.ConfigurationData:GetConfigOptLocation (System.String sectionName, System.Web.HttpContext context, Boolean useLoc)
    in <0x00276> System.Web.Configuration.ConfigurationData:GetConfig (System.String sectionName, System.Web.HttpContext context)
    in <0x0005a> System.Web.Configuration.WebDefaultConfig:GetConfig (System.String sectionName, System.Web.HttpContext context)
    in <0x00017> System.Web.Configuration.WebConfigurationSettings:GetConfig (System.String sectionName, System.Web.HttpContext context)
    in <0x0000d> System.Web.HttpContext:GetConfig (System.String name)
    in <0x00028> System.Web.Configuration.CompilationConfiguration:GetInstance (System.Web.HttpContext context)
    in <0x0001a> System.Web.UI.BaseParser:get_CompilationConfig ()
    in <0x0013f> System.Web.UI.TemplateParser:.ctor ()
    in <0x0000a> System.Web.UI.ApplicationFileParser:.ctor (System.String fname, System.Web.HttpContext context)
    in <0x00034> System.Web.UI.ApplicationFileParser:GetCompiledApplicationType (System.String inputFile, System.Web.HttpContext context)
    in <0x000ae> System.Web.HttpApplicationFactory:InitType (System.Web.HttpContext context)
    in <0x00050> System.Web.HttpApplicationFactory:GetApplication (System.Web.HttpContext context)
    in <0x00083> System.Web.HttpRuntime:RealProcessRequest (System.Object o)
    LVL 10

    Expert Comment

    Some versions of mono gave this vague error when the server lacked permissions to the directory being watched.

    "You cannot monitor a directory on which you don't have appropiate permissions."

    Author Comment

    Thanks furiously, it finally works, your answer greatly helped us

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now