问题
I copied these files to C:\MonoWebServer.
xsp2.exe
xsp2.exe.mdb
Mono.WebServer2.dll
Mono.Security.dll
I registered Mono.WebServer2.dll & Mono.Security.dll in the GAC. When I go to run xsp2.exe I get.
What am I doing wrong!
Windows 7 - 64bit
回答1:
Ok I'v got it working now. Here are the steps.
- Create an empty Asp.net MVC site.
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.dllCopy those same 3 files into the bin folder.
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.
来源:https://stackoverflow.com/questions/9747169/getting-could-not-load-file-or-assembly-xsp2-with-mono-2-10-8