Getting “could not load file or assembly 'xsp2'” with Mono 2.10.8

前端 未结 1 1135
日久生厌
日久生厌 2021-01-12 12:54

I copied these files to C:\\MonoWebServer.

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

I registered Mono.WebServer2.dll & Mon

相关标签:
1条回答
  • 2021-01-12 13:39

    Ok I'v got it working now. Here are the steps.

    1. Create an empty Asp.net MVC site.
    2. Copy xsp4.exe, Mono.Security.dll & 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

    3. Copy those same 3 files into the bin folder.

    4. Now run xsp4.exe from the root folder. By default it should run on port 8080. So open a browser to http://localhost:8080 and it should work.

    Notes
    I'm not really sure why but xsp creates a new instance of MonoWebServer based on the assembly name of the Server class. So when it trys to resolve it, it defaults to looking in the bin folder. Thats why you have to copy xsp and any dependency files to the bin folder.

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

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

    Deployment
    Xsp web server does not need the Mono framework to run on Windows machines with .NET Framework installed.

    0 讨论(0)
提交回复
热议问题