2

I'm trying to develop a simple web app using asp.net MVC 5 with Mono and Xamarin Studio. I have followed the stepts here: http://curtis.schlak.com/2014/02/04/setup-asp-net-mvc-4-on-monodevelop-4.2.html to get Mono working fine, but when I try to load an image using:

<img src="~/Content/images/header-left.png" alt="asiser" class="img-responsive pull-left" />

I get this exception:

System.NotImplementedException

at System.Web.HttpContextWrapper.GetService (System.Type serviceType) [0x00000] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs:189 

I can't find anything related to this issue so I'd like to know if anybody is getting the same error.

Thanks

Gerardo
  • 5,800
  • 11
  • 66
  • 94
  • It looks like it's trying to route your image source to a controller. You need to set it up to ignore static content urls. – Mitchell Lee Mar 30 '14 at 23:37
  • And how can i do that? – Gerardo Mar 30 '14 at 23:43
  • where you've setup your routes, try something like: routes.IgnoreRoute("content/*.png") – Mitchell Lee Mar 30 '14 at 23:46
  • I have tried: routes.IgnoreRoute ("Content/*.png"); and routes.IgnoreRoute ("Content/images/*.png"); but the problem still happens. Do you have mono working with MVC 3? Thanks – Gerardo Mar 31 '14 at 00:05
  • No sorry, I was looking at the error, and it seems like that's what's happening. I found a similar SO post, might be able to help: http://stackoverflow.com/questions/9244033/httpcontext-getservice-in-mono Edit: This SO post actually seems to be more along the track of the issue your having: http://stackoverflow.com/questions/21292026/why-does-tooptimizedresult-throw-requested-feature-is-not-implemented-on-mono – Mitchell Lee Mar 31 '14 at 00:51
  • possible duplicate of [Mono ASP.NET MVC tilde in href causes System.NotImplementedException](http://stackoverflow.com/questions/28652353/mono-asp-net-mvc-tilde-in-href-causes-system-notimplementedexception) – chue x Feb 22 '15 at 01:16

0 Answers0