使用一個 XSP4 子程序從 2 個不同的根目錄在 Ubuntu 16.04 上提供 ASP.NET Webforms 內容?

使用一個 XSP4 子程序從 2 個不同的根目錄在 Ubuntu 16.04 上提供 ASP.NET Webforms 內容?

我們希望使用一個 XSP4 子程序從 2 個不同的根目錄在 Ubuntu 16.04 上提供 ASP.NET Webforms 內容。

在 中/etc/mono-server4,我建立了debian.webapp指定根目錄/var/www/firstaspnetseconddebian.webapp指定根目錄/var/www/secondaspnet。我想這就夠了。但我得到了這個運行時異常:

 System.Web.HttpException
    The resource cannot be found.

    Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    Details: Requested URL: /hello.aspx
    Exception stack trace:
      at System.Web.Compilation.BuildManager.AssertVirtualPathExists (System.Web.VirtualPath virtualPath) <0x40e88650 + 0x00197> in <filename unknown>:0 
      at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) <0x40e883f0 + 0x00033> in <filename unknown>:0 
      at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) <0x40e880a0 + 0x00093> in <filename unknown>:0 
      at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web.VirtualPath virtualPath, System.Type requiredBaseType) <0x40e87f50 + 0x00033> in <filename unknown>:0 
      at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context) <0x40e87bb0 + 0x000bb> in <filename unknown>:0 
      at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path) <0x40e87b70 + 0x00027> in <filename unknown>:0 
      at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) <0x40e7ccb0 + 0x002de> in <filename unknown>:0 
      at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) <0x40e7cc80 + 0x0001b> in <filename unknown>:0 
      at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () <0x40e65a50 + 0x02aab> in <filename unknown>:0

在系統重新引導期間,我只執行由我的 systemd apache2.service 產生的 mod-mono-server4.exe 的實例,如下 ps -ef 所示:

  148:www-data  1090     1  0 16:42 ?        00:00:00 /usr/bin/mono /usr/lib/mono/4.5/mod-mono-server4.exe --filename /tmp/.mod_mono_server4 --nonstop --appconfigdir /etc/mono-server4

有人可以大膽假設我遺漏了什麼或做錯了什麼嗎?

任何幫助是極大的讚賞。

相關內容