[Mono-aspnet-list] MVC 3 App Cannot Find Template
carlhoerberg
carl.hoerberg at gmail.com
Tue Mar 15 22:57:18 EDT 2011
it looks alright. you're using mono 2.10.1? did you precompile without
"updatable"? mono doesn't cope with that..
On Wed, Mar 16, 2011 at 09:47, Daniel J. Summers [via Mono]
<ml-node+3380701-32757232-218826 at n4.nabble.com> wrote:
> On Tue, Mar 15, 2011 at 2:54 PM, Carl Hörberg <[hidden email]> wrote:
>>
>> it works in both environments :)
>
> This didn't seem to fix it. Still works fine on Windows, but still throws
> the error in Mono. (Even did clean/build and restarted Apache to flush the
> compiled cache.) Here's my Global.asax.cs - did I mess something up on the
> copy?
> namespace VPR {
> using System;
> using System.Collections.Generic;
> using System.Configuration;
> using System.Linq;
> using System.Web;
> using System.Web.Mvc;
> using System.Web.Routing;
> /// <summary>
> /// Override to support Mono
> /// </summary>
> public class MonoWebFormViewEngine : WebFormViewEngine {
> protected override bool FileExists(ControllerContext
> controllerContext, string virtualPath) {
> return base.FileExists(controllerContext,
> virtualPath.Replace("~", ""));
> }
> }
> /// <summary>
> /// Override to support Mono
> /// </summary>
> public class MonoRazorViewEngine : RazorViewEngine {
> protected override bool FileExists(ControllerContext
> controllerContext, string virtualPath) {
> return base.FileExists(controllerContext,
> virtualPath.Replace("~", ""));
> }
> }
> // Note: For instructions on enabling IIS6 or IIS7 classic mode,
> // visit http://go.microsoft.com/?LinkId=9394801
> public class MvcApplication : System.Web.HttpApplication {
> public static void RegisterGlobalFilters(GlobalFilterCollection
> filters) {
> filters.Add(new HandleErrorAttribute());
> }
> public static void RegisterRoutes(RouteCollection routes) {
> routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
> routes.MapRoute(
> "Default", // Route name
> "{controller}/{action}/{id}", // URL with parameters
> new { controller = "Home", action = "Index", id =
> UrlParameter.Optional } // Parameter defaults
> );
> }
> protected void Application_Start() {
> // Put Mono-supporting view engines in the context
> ViewEngines.Engines.Clear();
> ViewEngines.Engines.Add(new MonoWebFormViewEngine());
> ViewEngines.Engines.Add(new MonoRazorViewEngine());
> AreaRegistration.RegisterAllAreas();
> RegisterGlobalFilters(GlobalFilters.Filters);
> RegisterRoutes(RouteTable.Routes);
> }
> }
> }
> --
> Daniel J. Summers
> Owner, DJS Consulting
> [hidden email] • Website • Support • Tech Blog
> GEEKCODE 3.12 GCS/IT d s-:+ a C++ P--- L++ E--- W++ N++ o? K- w !O M--
> V PS+ PE++ Y? PGP- t+ 5? X+ R* tv b+ DI++ D+ G- e<++ h---- r+++ y++++
>
> _______________________________________________
> Mono-aspnet-list mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://mono.1490590.n4.nabble.com/MVC-3-App-Cannot-Find-Template-tp3353175p3380701.html
> To unsubscribe from MVC 3 App Cannot Find Template, click here.
--
View this message in context: http://mono.1490590.n4.nabble.com/MVC-3-App-Cannot-Find-Template-tp3353175p3380710.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110315/9ebda7c2/attachment-0001.html
More information about the Mono-aspnet-list
mailing list