错误500单声道Apache Ubuntu与ASP.NET C#

时间:2013-08-14 21:12:03

标签: c# asp.net mono apache2

Server Error in '/' Application
Access to the path "/var/www/Ubuntu/Bin" is denied.

Description: HTTP 500. Error processing request.

Stack Trace:

System.UnauthorizedAccessException: Access to the path "/var/www/Ubuntu/Bin" is denied.
  at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.LoadPrecompilationInfo (System.String precomp_config) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager..cctor () [0x00000] in <filename unknown>:0 

Version information: Mono Runtime Version: 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2); ASP.NET Version: 2.0.50727.1433

我使用Mono来运行我的ASP.NET C#,
所有代码都在我的PC上使用Window XP SP3,IIS,
不幸的是,当我尝试使用Ubuntu Server 12.04 LTS将所有ASP.NET文件上传到我的服务器时,会发生此错误。
我已尝试将Bin文件夹设置为777权限,但仍无法正常工作 在我的Bin文件夹中是.DLL文件,让ASP.NET DirectMethod调用函数

这是我的Bin文件夹的文件 root@ubuntu:/var/www/Ubuntu/Bin# dir
App_Code.dll
App_Web_7userbmq.dll
Ext.Net.Utilities.dll
App_Web_7userbmq1.dll Ext.Net.dll
Newtonsoft.Json.dll

这是我在路径/etc/apache2/sites-available/Ubuntu

中的Apache2站点设置
<VirtualHost *:80>
  ServerName example.org
  ServerAdmin web-admin@example.org
  ServerAlias www.example.org
  DocumentRoot /var/www/Ubuntu
  ErrorLog /var/www/Ubuntu/logs/error.log
  CustomLog /var/www/Ubuntu/logs/access.log combined

  MonoServerPath example.org "/usr/bin/mod-mono-server2"
  MonoDebug example.org true
  MonoSetEnv example.org MONO_IOMAP=all
  MonoApplications example.org "/:/var/www/Ubuntu"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias example.org
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  </IfModule>
</VirtualHost>

更新:在我的PC上我使用的是.NET 3.5,在Apache Mono上使用的是2.0。这是问题吗?

0 个答案:

没有答案