locked
Shared hosting and ASP.NET MVC RRS feed

  • Question

  • User-241614920 posted

    Hi,

    I am using discountasp.net as my hoster. When I try a basic MVC (Preview 2) it does not work and I get 404. I even updated the Routetable to have .mvc extension infront of controller.

    Does the hoster needs to add .mvc mapping in his IIS ?. And what it should be mapped to ?

    Regards & thanks

    Kapil 

     

     

    Saturday, March 22, 2008 10:32 AM

All replies

  • User1014126842 posted

    This is my script map on webhost4life. It still doesn't work all the time. One app works, but another one on another server doesn't. I can't figure it out. 

    .mvc  C:\WINDOWS\MICROSOFT.NET\FRAMEWORK\V2.0.50727\ASPNET_ISAPI.DLL

    Saturday, March 22, 2008 11:48 AM
  • User1220545395 posted

    Instead of .mvc, you could try using .aspx in your routes. Not as nice, but it ought to work. For example, your route url might look like:

     {controller}.aspx/{action}/{id}

    Saturday, March 22, 2008 2:58 PM
  • User-241614920 posted

    This is the first thing that I had tried [i.e. using .aspx in the routes] but it did not work. I saw it in web.config also, changing there did not make a difference.

     Is there any other place where I need to change .mvc to .aspx ?

    Regards & thanks

    Kapil

    Saturday, March 22, 2008 7:03 PM
  • User1046815810 posted

    If i'm not mistaken Discountasp offers iis7 hosting. You can ask for an upgrade and that should take care of your problem. In IIS7 you can register an asp.net httpmodule directly to IIS in the web.config file. The asp.net mvc web.config already comes with this configured and you should have no problem running in iis7.

    another option which is not very elegant and may slow your server is to rout all traffic to the asp.net isap dll. this slows performance but it was the only thing that worked for me in server 2003 with iis6.

    Sunday, March 23, 2008 7:50 AM
  • User-1422240412 posted
    I did the tricks mentioned in my blog post to get around the 404 problem and some other compression, caching and performance problems: http://msmvps.com/blogs/omar/archive/2008/06/30/deploy-asp-net-mvc-on-iis-6-solve-404-compression-and-performance-problems.aspx
    Monday, June 30, 2008 4:48 AM
  • User1286129386 posted

    I am using discountasp.net as my hoster.

    Regards & thanks

    Kapil 

     

     

     Did you get anywhere with discountasp.net? I'm having the same issue, only when I deploy to their servers and I've made no changes to my own.

     

    Kind Regards,

    -Dye

    Saturday, August 9, 2008 9:18 PM
  • User-1553786653 posted

    Hi All,

    Need some advice. I built Scott Gu's MVC demo and got it running on localhost and ran into the same trouble when uploading (File not found). My web host provider is advising that I switch over to a server running IIS7. That way I won't have to go to all the trouble of rerouting in Application_BeginRequest (plus all the other trouble: http://msmvps.com/blogs/omar/archive/2008/06/30/deploy-asp-net-mvc-on-iis-6-solve-404-compression-and-performance-problems.aspx)

    Here's the problem. I would have to transfer three other apps built with VS2k5 against 2.0. I have a main domain with two (now three with this MVC app) subdomains running under it. I plan on converting these apps to target 3.5 in the near future. Am I opening up a can of worms by doing this? What to do? Should I convert first then transfer?

    Also,

    Does anyone know why this statement is auto-added to the Global.asax for a new MVC project:

    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

    I'm adding an axd path in the web config of the main domain to get a gradient (from code project) so ... this is causing a runtime error when I try to load the MVC app (at least I think).

    UPDATE: That wasn't causing the issue. I didn't have the Gradient Handler utility classes in the MVC project. Creating an App_Code folder and adding them to it, along with adding the handler path in the web config, fixed that particular error.

    Tuesday, October 14, 2008 6:27 AM
  • User-1679855289 posted

     I am using discountasp.net to successfully host an mvc app.  Make sure you are on an iis7 server and your app pool pipeline mode is set to integrated.

    Tuesday, October 14, 2008 2:39 PM
  • User-158792381 posted

    My answer is "Yes",the hoster needs to add .mvc mapping in his IIS.


    But ,if You don't have the administration rights of the romote IIS server, You should try this workaround : updated the Routetable to have .ashx extension infront of controller,enjoy!

    Wednesday, October 15, 2008 5:55 AM
  • User2039466906 posted

    You don't necessairly have to be on IIS7.  I asked my hoster to just map all requests to ISAPI ASP.NET and it was no problem.  Check out this post and associated comments:

    http://weblogs.asp.net/mikebosch/archive/2008/07/22/asp-net-hosting-recommendation-if-you-re-on-a-budget.aspx

     

    Thursday, October 16, 2008 2:56 PM
  • User-1800862064 posted

    Hi,

    I am using discountasp.net as my hoster. When I try a basic MVC (Preview 2) it does not work and I get 404. I even updated the Routetable to have .mvc extension infront of controller.

    Does the hoster needs to add .mvc mapping in his IIS ?. And what it should be mapped to ?

    Regards & thanks

    Kapil 

    Maybe you need classic pool

    Recommend shared mvc hosting

    http://www.webhost4lifereview.com/asp.net-mvc-hosting/

    Thursday, August 6, 2009 2:57 PM