Page view counter

Shared hosting and ASP.NET MVC

Last post 10-16-2008 2:56 PM by MikeBosch. 10 replies.

Sort Posts:

  • Shared hosting and ASP.NET MVC

    03-22-2008, 10:32 AM
    • Loading...
    • ksachdeva17
    • Joined on 11-03-2006, 10:26 PM
    • Posts 38
    • Points 13

    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
    • Loading...
    • tangle
    • Joined on 07-23-2002, 12:04 PM
    • Posts 72
    • Points 209

    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
    • Loading...
    • Haacked
    • Joined on 09-17-2003, 10:43 AM
    • Posts 377
    • Points 4,901
    • AspNetTeam

    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
    • Loading...
    • ksachdeva17
    • Joined on 11-03-2006, 10:26 PM
    • Posts 38
    • Points 13

    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
    • Loading...
    • srulyt
    • Joined on 02-02-2008, 6:16 PM
    • Posts 226
    • Points 1,045

    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
    • Loading...
    • oazabir
    • Joined on 12-31-2005, 4:45 PM
    • Kuala Lumpur, Malaysia
    • Posts 7
    • Points 23
    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
    • Loading...
    • SpeedBump
    • Joined on 08-10-2008, 1:15 AM
    • Posts 1
    • Points 2

    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
    • Loading...
    • FoolongC
    • Joined on 08-24-2007, 1:12 AM
    • Posts 70
    • Points 41

    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
    • Loading...
    • f00sion
    • Joined on 05-28-2004, 5:58 PM
    • Irvine, CA
    • Posts 77
    • Points 192

     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
    • Loading...
    • shunzimm
    • Joined on 11-17-2006, 4:30 AM
    • china
    • Posts 9
    • Points 23

    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
    • Loading...
    • MikeBosch
    • Joined on 02-12-2007, 10:17 PM
    • Miami, FL
    • Posts 127
    • Points 572

    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) ***
Page 1 of 1 (11 items)