asp.net - Mono/ASP/lighttpd/Linux : relative path not working

标签 asp.net ubuntu mono lighttpd

找不到文件“~/pages/footer.htm”。是我得到的错误

实际的代码段是...

Response.WriteFile("~/pages/footer.htm"); 

我刚刚安装了 lighttpd 并将其设置为大约一小时前在我的 ubuntu vm 上通过 mono 运行我们的 asp 应用程序

是的,footer.htm 文件存在于/pages/footer.htm 位置(其中/是根目录/var/www)

最佳答案

您不能在路径字符串中使用 ~,因为没有应用 shell 扩展规则(与 c/c++ 相同)。

关于asp.net - Mono/ASP/lighttpd/Linux : relative path not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7394212/

相关文章:

asp.net - 如何在 Umbraco 中创建可编辑宏

asp.net - 在 IIS7.5 中,什么模块删除了 400 Bad Request 的主体

ASP.NET MVC Urls 和 IIS 集成 Windows 身份验证

php - 在 Ubuntu 12.04 上启用 XSL

c# - MySql.Data.MySqlClient.Replication.ReplicationManager 抛出 System.TypeInitializationException

asp.net - 在每页级别上增加ASP.Net超时

windows - 有没有办法在 Windows 上的 Ubuntu 上的 Bash 中使用 Notepad++ 打开文件?

python - Gunicorn --reload 不适用于具有本地存储库的 Ubuntu

c# - 树莓派上的单声道在共享对象 (.so) 文件的 DLLImport 处抛出 DLLNotFoundException

c# - OSX 上的 Mono WCF 问题