我正在尝试使用Mono和XSP4在我的Linux机器上启动MVC5网站.它适用于没有视图但是当我尝试渲染某些东西时它会给我带来错误.
这是我的测试代码.请注意,我没有更改任何内容,这基本上是没有EF或任何其他库的空白站点.只是裸骨MVC5 +剃刀.
public ActionResult Index()
{
// return Content("'sall good"); // works
return View();
}
Run Code Online (Sandbox Code Playgroud)
System.InvalidOperationException
找不到Razor Host Factory类型:System.Web.Mvc.MvcWebRazorHostFactory,System.Web.Mvc,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35
描述:HTTP 500.Error处理请求.
详细信息:非Web异常.异常来源(应用程序或对象的名称):System.Web.WebPages.Razor.
堆栈跟踪
at System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory (System.String typeName) [0x00000] in <filename unknown>:0
at System.Collections.Concurrent.ConcurrentDictionary`2+<GetOrAdd>c__AnonStorey3[System.String,System.Func`1[System.Web.WebPages.Razor.WebRazorHostFactory]].<>m__0 () [0x00000] in <filename unknown>:0
at (wrapper delegate-invoke) System.Func`1<System.Collections.Generic.KeyValuePair`2<string, System.Func`1<System.Web.WebPages.Razor.WebRazorHostFactory>>>:invoke_TResult__this__ ()
...
Run Code Online (Sandbox Code Playgroud)
我试图将Version = 5.0.0.0更改为4.0.0.0和3.0.0.0等但没有任何作用.我现在仍然得到同样的错误,大约是4.0.0.0.
有什么希望吗?
我正在尝试在Mono 2.10.8.1之上托管ASP.NET MVC4 RC项目.我第一次访问应用程序时遇到以下异常:
Missing method System.Web.Security.FormsAuthentication::get_IsEnabled() in assembly /usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll, referenced in assembly /tmp/root-temp-aspnet-0/eaee30a1/assembly/shadow/5cf10065/40974e7d_1c664e18_00000001/System.Web.Http.WebHost.dll
Run Code Online (Sandbox Code Playgroud)
根据http://www.mono-project.com/Compatibility,这应该在Mono 2.10.8中实现.Microsoft将该属性列为.NET Framework 4.0:http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.isenabled.aspx
是否存在某种解决方法,或者目前无法在Mono上主持MVC4?
我应该注意到,在Apache2上使用XSP4和mod_mono时,我遇到了这个问题.
单声道版本如下:
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1~dhx1~lucid1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
Run Code Online (Sandbox Code Playgroud) 我有一个使用Web服务与ASP.Net的应用程序,我应该维护.所以我在这个主题上提高了我的技能.我在使用VS 2013的Window中运行Webservice没有问题但是有单声道问题.
这是我运行代码时得到的错误
System.ArgumentNullException
Value cannot be null.
Parameter name: path1
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
at System.IO.Path.Combine (System.String path1, System.String path2) [0x00006] in <filename unknown>:0
at System.Web.Services.Configuration.WsdlHelpGeneratorElement.get_HelpGeneratorPath () [0x0000c] in <filename unknown>:0
at System.Web.Services.Protocols.DocumentationServerProtocol.Initialize () [0x001f1] in <filename unknown>:0
at System.Web.Services.Protocols.ServerProtocol.SetContext (System.Type type, System.Web.HttpContext context, System.Web.HttpRequest request, System.Web.HttpResponse response) [0x00022] in <filename unknown>:0
at System.Web.Services.Protocols.ServerProtocolFactory.Create (System.Type type, System.Web.HttpContext context, System.Web.HttpRequest request, System.Web.HttpResponse response, System.Boolean& abortProcessing) …Run Code Online (Sandbox Code Playgroud) 我将这些文件复制到C:\ MonoWebServer.
xsp2.exe
xsp2.exe.mdb
Mono.WebServer2.dll
Mono.Security.dll
我在GAC中注册了Mono.WebServer2.dll和Mono.Security.dll.当我去运行xsp2.exe时,我得到了.

我究竟做错了什么!
Windows 7 - 64位
我必须在ubuntu机器上将asp.net 4.5网站移植到mono 2.10.8.1.
xsp4是否支持asp.net 4.5或者我应该暂时在4.0中构建我的原始网站?
另外我如何获得最新版本并安装?