-
-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autofac on Linux/Mono makes Razor not working #689
Comments
It appears to me that you asked this question a year ago on StackOverflow and found the answer in modifying your web.config. Is the same answer not still working? Unfortunately, I don't really have a Linux/Mono environment on which I can test this - when we compile Autofac core for PCL, we trust that the framework is doing the right thing; and when we test Autofac MVC integration, it's with native Windows + .NET. I do know that the Autofac.Mvc5 package takes advantage of the Here's what I'd recommend - fork Autofac.Mvc and try implementing something in the If it does, file an issue over on the Autofac.Mvc repository and reference this one, letting us know. We try to keep the issues for each package in the respective repository. Better yet - send us a PR with the patch you made and verified as working. Again, though, I don't have an environment on which I can replicate or troubleshoot it, so I'm probably not going to be able to be any more help than this. If the above patch works - awesome, we'll integrate it accordingly. If not... perhaps re-asking on StackOverflow with more information may yield better results - someone else out there that I'm unaware of may have encountered the same issue and know how to fix it. |
Hello. Sorry for a delay, I was busy with other stuff. You've got very smart ideas how to fix the issue, however as I've just cloned Autofac repository, I've spotted couple of blockers:
|
So the situation was much easier than original looked. |
Hello.
I've got a project utilizing MVC5 & Autofac on Mono/Linux platform. It shows that after updating to mono-4.x, I've got problem that Razor engine is somehow not registered.
I've tried to reduce test-case, created just Example MVC5 project in Monodevelop:
https://github.com/marxin/test-mvc5-mono-autofac
Razor works, however if I just add Autofac MVC5 Integration package (no registration in code is done), it stops working with following message:
System.InvalidOperationException
The view found at '~/Views/Home/Index.cshtml' was not created.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
Exception stack trace:
at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) in :line 0
at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) in :line 0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in :line 0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList
1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in <filename unknown>:line 0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList
1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) in :line 0Version Information: 4.2.1 (Stable 4.2.1.60/804ddbc Tue Oct 27 00:22:01 UTC 2015); ASP.NET Version: 4.0.30319.17020
Thanks for help,
Martin
The text was updated successfully, but these errors were encountered: