在Linux上运行XSP ASP.NET应用程序时缺少方法错误 [英] Missing method errors when running ASP.NET app with xsp on linux

查看:191
本文介绍了在Linux上运行XSP ASP.NET应用程序时缺少方法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC和剃刀标记的网站ASP.NET,我想在我的Linux VPS运行它。

I have ASP.NET with MVC and Razor markup website and I want to run it on my Linux VPS.

我已经单3.2.8和xsp4 3.0.0.0版本,无论是从Ubuntu的仓库(使用安装的apt-get安装单完成单xsp4

I have mono 3.2.8 and xsp4 3.0.0.0 version, both from Ubuntu repository (installed using apt-get install mono-complete mono-xsp4)

当我上传我的网站服务器,并在网站上的文件夹中运行xsp4,它启动并打印出它监听端口8080然而,当我用我的网络浏览器浏览到我的网站,它会显示运行时错误,xsp4输出这种安慰

When I upload my website to server and run xsp4 in the website's folder, it start and prints out that it's listening on port 8080. However when I use my web browser to navigate to my website, it displays runtime error and xsp4 outputs this to console

Missing method System.Web.HttpApplication::RegisterModule(Type) in assembly
/usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll, referenced 
in assembly /tmp/root-temp-aspnet-0/55726984/
assembly/shadow/df4b0596/52105b83_8d5b5e15_00000001/Microsoft.Owin.Host.SystemWeb.dll

Missing method RegisterAllAreas in assembly /tmp/root-temp-aspnet-
0/55726984/assembly/shadow/dc5a60b8/51013ead_8d5b5e15_00000001/<website_name>.dll, type
System.Web.Mvc.AreaRegistration

这是一个新鲜的Ubuntu 14.04安装。我发展我的Windows上的网站,使用Visual Studio 2013年的任何想法如何解决这些错误?

It's a fresh Ubuntu 14.04 installation. I'm developing my website on Windows, using Visual Studio 2013. Any idea how to fix these errors?

推荐答案

对于这个问题,上游的bug报告所在的>。

The upstream bug report regarding this issue is located here.

一个建议的解决方法和实现方法是使用 Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule 而不是 HttpApplication.RegisterModule

A suggested workaround until the bug is fixed and the method implemented is to use Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule instead of HttpApplication.RegisterModule.

<一个href=\"https://katanaproject.$c$cplex.com/SourceControl/latest#src/Microsoft.Owin.Host.SystemWeb/$p$pApplicationStart.cs\"相对=nofollow>这里的问题描述了一个解决办法,这将是改变 HttpApplication.RegisterModule Microsoft.Web.Infrastructure .DynamicModuleHelper.DynamicModuleUtility.RegisterModule 在<一个href=\"http://katanaproject.$c$cplex.com/SourceControl/latest#src/Microsoft.Owin.Host.SystemWeb/$p$pApplicationStart.cs\"相对=nofollow> preApplicationStart.cs 在OWIN(在previous主已经拥有.NET 4.0的相关IFDEF,但它是恢复由于某种原因),或者包括他们指定的DLL或手动注册模块中的web.config文件。

The issue here describes a workaround, which would be to change HttpApplication.RegisterModule to Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule in PreApplicationStart.cs in OWIN (the previous master already had the relevant IFDEF for NET 4.0, but it was reverted for some reason) or to include the DLL they specify or register the module manually in the web.config .

这不需要任何code更改为OWIN的替代方法是实现单缺少方法和修复bug,然后反向移植修复你的单声道版本。

The alternative that doesn't require any code change to OWIN is to implement the missing method in Mono and fix the bug and then backport the fix to your Mono version.

这篇关于在Linux上运行XSP ASP.NET应用程序时缺少方法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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