This forum is in archive mode. You will not be able to post new content.

Author Topic: How to run ASP.NET applications with mono and xsp  (Read 4638 times)

0 Members and 1 Guest are viewing this topic.

Offline m0l0ko

  • Peasant
  • *
  • Posts: 129
  • Cookies: -4
    • View Profile
How to run ASP.NET applications with mono and xsp
« on: October 14, 2012, 06:47:26 PM »
I setup mono along with an xsp server and am using monodevelop to make ASP.NET projects. Everything works but for some reason I can't point the browser to files (such as css files or images), the browser can never find them. To view the ASP.NET page I made, I point my browser to http://localhost:8080. Lets say I make an images folder and put image.jpg into it. If I wanna view the image, I should be able to just point the browser to http://localhost:8080/images/image.jpg but it doesn't work. If I use the HTML tag <img src="images/image.jpg">, it can't display the image cuz it can't find it. I've tried xsp2 and xsp4.
 
 If I open the source with firefox then click on the link to the image in the source code, heres what comes up:
 
 
Quote
[System.Web.HttpException]: The controller for path '/images/image.jpg' was not found or does not implement IController.
 at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance (System.Web.Routing.RequestContext requestContext, System.Type controllerType) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.DefaultControllerFactory.CreateController (System.Web.Routing.RequestContext requestContext, System.String controllerName) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.MvcHandler.ProcessRequestInit (System.Web.HttpContextBase httpContext, IController& controller, IControllerFactory& factory) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.MvcHandler+<>c__DisplayClass6.<BeginProcessRequest>b__2 () [0x00000] in <filename unknown>:0
 at System.Web.Mvc.SecurityUtil+<>c__DisplayClassb`1[System.IAsyncResult].<ProcessInApplicationTrust>b__a () [0x00000] in <filename unknown>:0
 at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0 (System.Action f) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (System.Action action) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[IAsyncResult] (System.Func`1 func) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContextBase httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContext httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
 at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback cb, System.Object extraData) [0x00000] in <filename unknown>:0
 at System.Web.HttpApplication+<Pipeline>c__Iterator6.MoveNext () [0x00000] in <filename unknown>:0
 at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
 
 

I only have this problem with MVC projects, not with WebForms projects. The problem seems to be that if I enter the URL localhost:8080/images/image.jpg, it treats images as a controller rather than a directory. Anyone know how to fix this?
« Last Edit: October 14, 2012, 08:32:44 PM by m0l0ko »

Offline m0l0ko

  • Peasant
  • *
  • Posts: 129
  • Cookies: -4
    • View Profile
Re: How to run ASP.NET applications with mono and xsp
« Reply #1 on: October 15, 2012, 04:15:03 PM »
I figured it out. There was a line in the Web.config file that was causing the problem. I got the config file from a tutorial I found online, I just took the necessary code from it and made my own Web.config file which works.
« Last Edit: October 15, 2012, 06:37:03 PM by m0l0ko »

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.