获取“无法加载文件或程序集'xsp2'".使用Mono 2.10.8 [英] Getting "could not load file or assembly 'xsp2'" with Mono 2.10.8

查看:126
本文介绍了获取“无法加载文件或程序集'xsp2'".使用Mono 2.10.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将这些文件复制到了C:\ MonoWebServer.

I copied these files to C:\MonoWebServer.

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

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

我注册了Mono.WebServer2.dll& GAC中的Mono.Security.dll. 当我去运行xsp2.exe时,我得到了.

I registered Mono.WebServer2.dll & Mono.Security.dll in the GAC. When I go to run xsp2.exe I get.

我在做什么错了!

Windows 7-64位

Windows 7 - 64bit

推荐答案

好,我现在可以正常工作了.步骤如下.

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

  1. 创建一个空的Asp.net MVC网站.
  2. 复制 xsp4.exe Mono.Security.dll & Mono.WebServer2.dll 到网站的根目录.
    文件结构应如下所示.
    网站
    --bin
    -内容
    -型号
    -观看次数
    xsp4.exe
    Mono.Security.dll
    Mono.WebServer2.dll

  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个文件复制到 bin 文件夹中.

Copy those same 3 files into the bin folder.

现在从根文件夹运行xsp4.exe.默认情况下,它应该在端口8080上运行.因此,打开浏览器到 http://localhost:8080 ,它应该可以工作.

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.

注释
我不太确定为什么,但是xsp根据Server类的程序集名称创建了一个MonoWebServer的新实例.因此,当它尝试解决该问题时,默认情况下是查看 bin 文件夹.因此,您必须将xsp和所有依赖项文件复制到 bin 文件夹中.

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.

您可以获取文件 xsp2.exe xsp4.exe Mono.Security.dll & Mono.WebServer2.dll ,安装了最新版本的 Mono .

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

框架版本
这适用于建立在.NET 4.0上的网站.如果您尝试部署.NET 2.0网站,则需要注册 Mono.Security.dll & GAC中的 Mono.WebServer2.dll ,并使用 xsp2.exe 代替 xsp4.exe .

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.

部署
Xsp Web服务器不需要Mono框架即可在安装了.NET Framework的Windows计算机上运行.

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

这篇关于获取“无法加载文件或程序集'xsp2'".使用Mono 2.10.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆