Mono xsp4 file not found exception WebServer2

931 Views Asked by At

I am getting this error when trying to run xsp4 on Debian.

root@debian-x86:/opt# xsp
Handling exception type FileNotFoundException
Message is Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
IsTerminating is set to True
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0 

I have mono 3.10.0 installed to /opt/mono-3.10.0 and I have xsp 3.0.11 installed to /opt/xsp-3.0.11

I added both those directories to my PATH:

/opt/mono-3.10.0/bin:/opt/xsp-3.0.11/bin

Doing a search of the file system shows the DLL is in the GAC (I believe?):

root@debian-x86:/opt# find /opt -name Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/2.0/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/gac/Mono.WebServer2/0.2.0.0__0738eb9f132ed756/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/gac/Mono.WebServer2/0.4.0.0__0738eb9f132ed756/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/4.5/Mono.WebServer2.dll

I am completely new to both Linux and Mono so I am missing something here?

Do the lib paths have to go in some environment variable?

1

There are 1 best solutions below

0
On BEST ANSWER

XSP needs to be installed in the same prefix as mono, not in a different one.