需要修改OWIN(武士刀)在树莓派运行VS2013的WebApplication的MVC帮助 [英] Need help in modifying OWIN (Katana) for running VS2013's MVC WebApplication in Raspberry Pi

查看:756
本文介绍了需要修改OWIN(武士刀)在树莓派运行VS2013的WebApplication的MVC帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要运行Visual Studio 2013的默认​​MVC的WebApplication在树莓派2。我设法安装单4.0.1和Lighttpd的作为Web服务器,我能得到这个默认的MVC WebApplication的(无身份验证)上运行树莓机。然而,当我尝试同样的MVC WebApplication的但个人认证,它提供了以下错误:

I want to run Visual Studio 2013's default MVC WebApplication in Raspberry Pi 2. I managed to install mono 4.0.1 and Lighttpd as the web server, and I was able to get this default MVC WebApplication (with no authentication) run on the Raspberry machine. However, when I tried the same MVC WebApplication but with "Individual Authentication", it gives the following error:

System.MissingMethodException: Method 'HttpApplication.RegisterModule' not found.

谷歌搜索后,我发现它<一个href=\"http://stackoverflow.com/questions/27212512/missing-method-errors-when-running-asp-net-app-with-xsp-on-linux/28289791?noredirect=1#comment48377110_28289791\">here这种方法'RegisterModule()'单声道的System.Web.HttpApplication未实现。解决的办法是重建OWIN。我从来没有这么做过。我用'混帐击克隆武士刀如下:

After googling, I found it here that this method 'RegisterModule()' is not implemented in mono's System.Web.HttpApplication. And the solution is to rebuild OWIN. I have never done that before. I used 'Git Bash' to clone the Katana as follow:

git clone https://git01.codeplex.com/katanaproject

然后相应地修改了preApplicationStart.cs,然后在命令提示符下运行构建,并成功创建了Microsoft.Owin.Host.SystemWeb.dll项目目录下。然后,我尝试在Visual Studio 2013年这一新的取代原来的DLL,然后按F5尝试运行它,并获得以下错误:

then modified the PreApplicationStart.cs accordingly, and then run 'build' in command prompt, and it successfully created the Microsoft.Owin.Host.SystemWeb.dll under the project directory. I then tried to replace the original dll with this new one in Visual Studio 2013, and hit F5 to try to run it, and get the following errors:

The type 'Microsoft.Owin.IOwinContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=null'.  

'Microsoft.Owin.IOwinContext' does not contain a definition for 'GetUserManager' and the best extension method overload 'Microsoft.AspNet.Identity.Owin.OwinContextExtensions.GetUserManager<TManager>(Microsoft.Owin.IOwinContext)' has some invalid arguments

这是重建OWIN并更新此Microslft.Owin.Host.SystemWeb.dll的正确方法?任何建议得到它的工作?

Is this the proper way to rebuild the OWIN and update this Microslft.Owin.Host.SystemWeb.dll? Any suggestion to get it work?

感谢。

推荐答案

得到它通过使用Visual Studio 2013中直接创建项目Microsoft.Owin.Host.SystemWeb,然后用结果Microsoft.Owin.Host.SystemWeb工作。 DLL替换原来的MVC WebApplication的项目中使用的。

Got it work by using Visual Studio 2013 to build the project Microsoft.Owin.Host.SystemWeb directly, then use the result Microsoft.Owin.Host.SystemWeb.dll to replace the one used in the original MVC WebApplication project.

这篇关于需要修改OWIN(武士刀)在树莓派运行VS2013的WebApplication的MVC帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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