Bug 21415 - System.Web.HttpContextWrapper.GetService throws NotImplementedException
Summary: System.Web.HttpContextWrapper.GetService throws NotImplementedException
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-17 18:48 UTC by Eddy Zavaleta
Modified: 2014-07-24 15:38 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Eddy Zavaleta 2014-07-17 18:48:06 UTC
I'm trying to run a MVC 5 application but it fails with a NotImplementedException.

The @Url.Content method in a Razor view is raising this exception.

Example:
<link rel='icon' type='image/png' href='@Url.Content("~/Content/images/icon16.png")' sizes='16x16' />

Version:
Microsoft.AspNet.Mvc >= 5.0.0
Mono JIT compiler version 3.6.0 ((no/c46cf0e Mon Jul 14 16:15:35 EDT 2014)

Exception stack trace:
  at System.Web.HttpContextWrapper.GetService (System.Type serviceType) [0x00000] in /Volumes/build-root-ramdisk/mono-3.6.0/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs:189 
  at System.Web.WebPages.UrlRewriterHelper.IsUrlRewriterTurnedOn (System.Web.HttpContextBase httpContext) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.UrlRewriterHelper.WasRequestRewritten (System.Web.HttpContextBase httpContext) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.UrlUtil.GenerateClientUrlInternal (System.Web.HttpContextBase httpContext, System.String contentPath) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.UrlUtil.GenerateClientUrlInternal (System.Web.HttpContextBase httpContext, System.String contentPath) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.UrlUtil.GenerateClientUrl (System.Web.HttpContextBase httpContext, System.String contentPath) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.UrlHelper.GenerateContentUrl (System.String contentPath, System.Web.HttpContextBase httpContext) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.UrlHelper.Content (System.String contentPath) [0x00000] in <filename unknown>:0 
  at ASP._Page_Views_Shared__Layout_cshtml.Execute () [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy () [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.WebViewPage.ExecutePageHierarchy () [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (System.Web.WebPages.WebPageContext pageContext, System.IO.TextWriter writer, System.Web.WebPages.WebPageRenderingBase startPage) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (System.Web.WebPages.WebPageContext pageContext, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase+<>c__DisplayClass7.<RenderPageCore>b__6 (System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.HelperResult.WriteTo (System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageExecutingBase.WriteTo (System.IO.TextWriter writer, System.Web.WebPages.HelperResult content) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.Write (System.Web.WebPages.HelperResult result) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.RenderSurrounding (System.String partialViewName, System.Action`1 body) [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.PopContext () [0x00000] in <filename unknown>:0 
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (System.Web.WebPages.WebPageContext pageContext, System.IO.TextWriter writer, System.Web.WebPages.WebPageRenderingBase startPage) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.RazorView.RenderView (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer, System.Object instance) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <filename unknown>: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) [0x00000] in <filename unknown>: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) [0x00000] in <filename unknown>:0

Note You need to log in before you can comment on or make changes to this bug.