Shared hosting and ASP.NET MVC

Last post 08-06-2009 2:57 PM by Aspfree.com. 11 replies.

Sort Posts:

  • Shared hosting and ASP.NET MVC

    03-22-2008, 10:32 AM
    • Member
      13 point Member
    • ksachdeva17
    • Member since 11-03-2006, 10:26 PM
    • Posts 38

    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 

     

     

  • Re: Shared hosting and ASP.NET MVC

    03-22-2008, 11:48 AM
    • Member
      209 point Member
    • tangle
    • Member since 07-23-2002, 12:04 PM
    • Posts 72

    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

  • Re: Shared hosting and ASP.NET MVC

    03-22-2008, 2:58 PM
    • Contributor
      5,602 point Contributor
    • Haacked
    • Member since 09-17-2003, 2:43 PM
    • Posts 384

    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}

    Phil Haack (http://haacked.com/)
    Senior Program Manager, Microsoft

    What wouldn’t you do for a Klondike bar?
  • Re: Shared hosting and ASP.NET MVC

    03-22-2008, 7:03 PM
    • Member
      13 point Member
    • ksachdeva17
    • Member since 11-03-2006, 10:26 PM
    • Posts 38

    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

  • Re: Shared hosting and ASP.NET MVC

    03-23-2008, 7:50 AM
    • Participant
      1,045 point Participant
    • srulyt
    • Member since 02-02-2008, 6:16 PM
    • Posts 226

    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.

    Filed under: ,
  • Re: Shared hosting and ASP.NET MVC

    06-30-2008, 4:48 AM
    • Member
      23 point Member
    • oazabir
    • Member since 12-31-2005, 4:45 PM
    • Kuala Lumpur, Malaysia
    • Posts 7
    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
    Regards,
    Omar AL Zabir
    Filed under:
  • Re: Shared hosting and ASP.NET MVC

    08-09-2008, 9:18 PM
    • Member
      2 point Member
    • SpeedBump
    • Member since 08-10-2008, 1:15 AM
    • Posts 1

    ksachdeva17:

    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

  • Re: Shared hosting and ASP.NET MVC

    10-14-2008, 6:27 AM
    • Member
      46 point Member
    • FoolongC
    • Member since 08-24-2007, 1:12 AM
    • Posts 78

    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.

  • Re: Shared hosting and ASP.NET MVC

    10-14-2008, 2:39 PM
    • Member
      192 point Member
    • f00sion
    • Member since 05-28-2004, 5:58 PM
    • Irvine, CA
    • Posts 77

     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.

  • Smile [:)] Re: Shared hosting and ASP.NET MVC

    10-15-2008, 5:55 AM
    • Member
      23 point Member
    • shunzimm
    • Member since 11-17-2006, 4:30 AM
    • china
    • Posts 9

    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!

  • Re: Shared hosting and ASP.NET MVC

    10-16-2008, 2:56 PM
    • Member
      587 point Member
    • MikeBosch
    • Member since 02-13-2007, 3:17 AM
    • Miami, FL
    • Posts 127

    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

     

    “It is not the strongest of the species that survives, nor the most intelligent. It is the one that is the most adaptable to change.”

    http://weblogs.asp.net/mikebosch

    *** Please MARK this post as ANSWERED, if you find it helpful) ***
  • Re: Shared hosting and ASP.NET MVC

    08-06-2009, 2:57 PM
    • Member
      44 point Member
    • Aspfree.com
    • Member since 07-20-2009, 8:27 PM
    • Selina
    • Posts 30

    ksachdeva17:

    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/

    Professional Aspfree.com!
    Professional ASP.NET Web Hosting -- Webhost4life
    Professional Web hosting review!
    Professional IT Hosting Solution!
Page 1 of 1 (12 items)