在Linux上运行XSP ASP.NET应用程序时缺少方法错误

编程入门 行业动态 更新时间:2024-10-20 20:52:18
本文介绍了在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.

这里的问题描述了一个解决办法,这将是改变 HttpApplication.RegisterModule 到 Microsoft.Web.Infrastructure .DynamicModuleHelper.DynamicModuleUtility.RegisterModule 在 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应用程序时缺少方法错误

本文发布于:2023-11-15 02:48:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1590472.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   错误   方法   XSP   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!