【问题标题】:apache and mod_mono debuggingapache 和 mod_mono 调试
【发布时间】:2013-10-23 02:45:59
【问题描述】:

我安装了 apache2 和 mod_mono。 问题是,当我请求 http://myvirtual.mynetwork/My.Services.WebsiteComms.test.aspx 时,文件被下载,而不是像 aspx 处理程序所说的那样执行。

mod_mono 已启用,一些有用的设置:

(已申请)/etc/rc.local:

if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
        /sbin/modprobe binfmt_misc
    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
fi
if [ -e /proc/sys/fs/binfmt_misc/register ]; then
        echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
else
        echo "No binfmt_misc support"
        exit 1
fi
exit 0

/etc/debian_version:

7.1

/etc/mono-server4/mono-server4-hosts.conf:

<IfModule mod_mono.c>
  MonoUnixSocket default /tmp/.mod_mono_server4
  MonoServerPath default /usr/bin/mod-mono-server4
  AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
  MonoApplicationsConfigDir default /etc/mono-server4
  MonoPath default /usr/lib/mono/4.0:/usr/lib
</IfModule>

(此文件包含在 /etc/apache2/mods-enabled/mono.conf 的 apache2 配置中)

/usr/bin/mod-mono-server4 正在运行,/tmp/.mod_mono_server4 是 www-data 用户可写的套接字。

我在 /srv/web 有一个虚拟主机的文档根目录 我在 docroot 中有这些文件:

My.Services.WebsiteComms.test.aspx
My.Services.WebsiteComms.test.aspx.config
My.Services.WebsiteComms.test.exe
My.Services.WebsiteComms.test.exe.config
My.Services.WebsiteComms.test.pdb

.aspx 只是一个 exe 文件的副本,如果我通过 mono ./My.Services.WebsiteComms.test.exe 运行它,它可以正常工作 aspx 和 exe 文件都有 +x 表示 www-data(所有者)。

【问题讨论】:

    标签: asp.net apache mono debian


    【解决方案1】:

    如果这是/etc/mono-server4/mono-server4-hosts.conf 的全部内容,那么您没有设置任何应用程序。您需要添加一些,手动或使用mono-server4-adminmono-server4-update(推荐)。

    【讨论】:

      猜你喜欢
      • 2010-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-23
      • 1970-01-01
      相关资源
      最近更新 更多