Getting "cannot load file or assembly" xsp2 "using Mono 2.10.8

I copied these files to C: \ MonoWebServer.

xsp2.exe
xsp2.exe.mdb
Mono.WebServer2.dll
Mono.Security.dll

I registered Mono.WebServer2.dll and Mono.Security.dll in the GAC. When I go to run xsp2.exe, I get. enter image description here

What am I doing wrong?

Windows 7 - 64bit

+6
source share
1 answer

OK, now I'm working. Here are the steps.

  • Create an empty MVC Asp.net website.
  • Copy xsp4.exe , Mono.Security.dll and Mono.WebServer2.dll to the root of the site.
    The file structure should look like this. Website
    --bin
    --Content
    --Models
    --Views
    xsp4.exe
    Mono.Security.dll
    Mono.WebServer2.dll

  • Copy the same 3 files to the bin folder.

  • Now run xsp4.exe from the root folder. By default, it should work on port 8080. Therefore, open the browser http: // localhost: 8080 and it should work.

Notes
I'm not sure why, but xsp creates a new instance of MonoWebServer based on the assembly name of the Server class. Therefore, when he tries to solve it, by default he searches in the bin folder. This is why you need to copy xsp and any dependency files to the bin folder.

You can get the files xsp2.exe , xsp4.exe , Mono.Security.dll and Mono.WebServer2. dll from installing the latest version of Mono .

Framework versions
This works for websites built on .NET 4.0. If you are trying to deploy .NET 2.0 sites, you will need to register Mono.Security.dll and Mono.WebServer2.dll in the GAC and use xsp2. exe instead of xsp4.exe .

Deployment
The Xsp web server does not need a Mono environment to run on Windows computers with the .NET Framework installed.

+10
source

Source: https://habr.com/ru/post/910964/


All Articles