How to deploy MVC app to shared hosting?

Rate It (1)

Last post 11-09-2009 5:21 AM by gerrylowry. 14 replies.

Sort Posts:

  • How to deploy MVC app to shared hosting?

    03-28-2008, 10:31 AM
    • Member
      point Member
    • Prem M
    • Member since 03-22-2008, 3:16 AM
    • Posts 2

    Hello,

    How to deploy an MVC app to shared hosting (I am using ReliableSite.net shared hosting Windows 2008 , IIS7 . 3.5 .NET)? 

    I have created the sample MVC app detailed at Walkthrough: Creating a Basic MVC Project in Visual Studio , but have no idea as to what files to upload to a shared hosting account and what to configure in web.config.

    The sample MVC app works fine on my desktop thru VS2008 Pro.

    For now, I tried uploading the full project with web.config , bin folder , and everything else as it is. When I visit the website, I get the home page "Introduction to ASP.NET MVC Application!", but clicking the Login link ( Login/Login) in menu results in

    -------------------------
    Server Error
    404 - File or directory not found.
    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    -------------------------

    I have no prior experience with ASP.NET and am a newbie at ASP.NET MVC. I hope I don't have to learn ASP.NET first to learn MVC? Do I, hope not!

    I have software development experience, just none for web development, so step by step help or a link to webpage with step by step instructions, to get the sample MVC running in shared hosting would be appreciated. 

    Deployment is a whole new beast for me. So please, step by step. Smile

    Thanks,
    Prem

  • Re: How to deploy MVC app to shared hosting?

    04-13-2008, 9:24 AM
    Answer
    • Member
      352 point Member
    • mehfuzh
    • Member since 09-28-2007, 3:02 PM
    • Posts 6

    If *.mvc extension is not registered to the hosting , it will give 404 exception. The working way of hosting MVC apps in that case is to modify global.asax routing caluse in the following way.

    routes.Add(new Route("{controller}.mvc.aspx/{action}", new MvcRouteHandler())
    {
        Defaults = new RouteValueDictionary (new{ controller = "YourController"} )
    });

    In this way all your controller request will end up in *.mvc.aspx, which is recognized by your hosting. And as the MVC dlls are copied into your local bin , no special setttings need to be done for it.

    Hope this helps

    Thanks,
    Mehfuz Hossain.
    http://weblogs.asp.net/mehfuzh
    Filed under:
  • Re: How to deploy MVC app to shared hosting?

    04-13-2008, 10:47 AM
    Answer
    • Participant
      1,045 point Participant
    • srulyt
    • Member since 02-02-2008, 6:16 PM
    • Posts 226

    Prem M:

    I have no prior experience with ASP.NET and am a newbie at ASP.NET MVC. I hope I don't have to learn ASP.NET first to learn MVC? Do I, hope not!

    DotNet experience is important but you don't have to know asp.net

    Prem M:

    How to deploy an MVC app to shared hosting (I am using ReliableSite.net shared hosting Windows 2008 , IIS7 . 3.5 .NET)? 

    if iis 7 is set to integrated pipeline it should work without having to add any extensions if not you will have to add extensions to your routes like shown above.

    many hosting providers allow you to change between integrated and classic pipelines. you should ask your webhost for more info in that regard

  • Re: How to deploy MVC app to shared hosting?

    05-01-2008, 7:55 PM
    Answer
    • Member
      13 point Member
    • philgeorge
    • Member since 03-06-2008, 4:16 AM
    • Melbourne, Australia
    • Posts 3

    I am deploying and asp.net mvc application with reliablesite.net, and I have just succeeded in getting it working with extensionless URLs.

    srulyt was correct - you need to set the IIS7 ASP.NET integrated pipeline on. For reliablesite.net, go into your DotNetPanel management interface, select your website and then the Extensions tab. Here they have an option to switch the ASP.NET option from "2.0" to "2.0 Integrated Pipeline". This should do the trick.

    Cheers

    Phil

    Phil George
  • Re: How to deploy MVC app to shared hosting?

    05-02-2008, 5:39 AM
    • Member
      129 point Member
    • gyan_flip
    • Member since 04-25-2008, 11:08 AM
    • बाघी - भोजपुर - बिहार - भारत
    • Posts 77

    If you are using IIS6, then add .mvc extension in in the url routing. If you are using IIS7 then its use integrated pipeline.

    ज्ञान [Gyan]
  • Re: How to deploy MVC app to shared hosting?

    05-02-2008, 5:42 AM
    • Member
      129 point Member
    • gyan_flip
    • Member since 04-25-2008, 11:08 AM
    • बाघी - भोजपुर - बिहार - भारत
    • Posts 77
  • Re: How to deploy MVC app to shared hosting?

    05-03-2008, 7:02 AM
    Answer
    • Member
      point Member
    • Prem M
    • Member since 03-22-2008, 3:16 AM
    • Posts 2

    Thanks to all who replied.

    srulyt's tip is correct. I had not enabled integrated pipeline. Once I did that, it started working.

     

  • Re: How to deploy MVC app to shared hosting?

    06-30-2008, 4:47 AM
    • Member
      23 point Member
    • oazabir
    • Member since 12-31-2005, 4:45 PM
    • Kuala Lumpur, Malaysia
    • Posts 7
    Please check out this article that might solve the 404 problem: 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: How to deploy MVC app to shared hosting?

    02-20-2009, 10:08 AM
    • Member
      289 point Member
    • MrRadic
    • Member since 11-08-2006, 7:13 PM
    • Posts 134

    Prem M:

    Thanks to all who replied.

    srulyt's tip is correct. I had not enabled integrated pipeline. Once I did that, it started working.

     

    Glad you got it resolved, if you have additional questions you can also submit a ticket at either support.reliablesite.net or by e-mailing support@reliablesite.net

    Microsoft Certified Professional

    ReliableSite.Net LLC
    Reliable Web Hosting - Take an extra 15% off for asp.net forum users use the coupon code aspforum at the checkout screen for any shared
  • Re: How to deploy MVC app to shared hosting?

    03-06-2009, 11:29 PM
    • Member
      12 point Member
    • teetee
    • Member since 04-21-2006, 10:29 PM
    • Cleveland, OH
    • Posts 24

     Check this link: http://www.asp.net/learn/mvc/tutorial-08-cs.aspx

     

     

  • Re: How to deploy MVC app to shared hosting?

    03-30-2009, 8:10 AM
    • Member
      392 point Member
    • you_rock
    • Member since 07-17-2008, 2:11 AM
    • Posts 148

    In case you are requiring an ASP.NET MVC hosting, you may consider asphostcentral.com as its mvc hosting plan only starts from $4.99/month. As far as I am concerned, MVC Framework can run well, both in IIS6 or IIS7.

  • Re: How to deploy MVC app to shared hosting?

    06-26-2009, 8:00 AM

    Hi, I'm using the web hosting service of Webhost4life, they can provide MVC by default, it's running perfect!

    http://www.webhost4life.org/go/hosting


    Good Luck!

    Asp.net 2.0 3.0 3.5 SP1 ASP.NET MVC - Please refer to WebHost4Life.com --- Fastest, Most Reliable Asp.net hosting Provider
  • Re: How to deploy MVC app to shared hosting?

    06-26-2009, 12:40 PM
    Answer
    • Contributor
      5,773 point Contributor
    • Haacked
    • Member since 09-17-2003, 2:43 PM
    • Posts 388
    • AspNetTeam

     If you're hosting on IIS 6, read this walkthrough: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

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

    What wouldn’t you do for a Klondike bar?
  • Re: How to deploy MVC app to shared hosting?

    11-09-2009, 4:51 AM
    • Member
      2 point Member
    • macbane
    • Member since 11-03-2009, 11:17 PM
    • Posts 2

    I was hoping www.webhost4life.com would work out, but they didn't for me. The sign up was a pain, and it was just to annoying. Also customer service though pretty quick had no idea about customer satisfaction. If I find some good hosts ill put them here.


    Filed under:
  • Re: How to deploy MVC app to shared hosting?

    11-09-2009, 5:21 AM
    • Contributor
      5,577 point Contributor
    • gerrylowry
    • Member since 07-02-2008, 9:46 PM
    • alliston ontario canada
    • Posts 2,087

    If several developers can work together, they are better to share a dedicated computer because then they are in full control.

    After looking at a number of options, it turned out that shared hosting was not for me.

    The price difference between shared and dedicated is not a lot if you have friends with whom you can split the cost.


    Example:  My almost totally useless "1&1 MS Developer" account costs me US$20 per month; my corenetworks.net costs me US75 per month.

    1&1 says I can have unlimited applications but they mean only ASP (I am only allowed between one and five ASP.NET applications).  So much for clarity in advertising.

    Note:  the first month with corenetworks.net cost more because I added some extra RAM and a second hard disk.

    BUT, with corenetworks.net I get Win2008 R2 Web Edition + SQL Server 2008 Web edition + quality, responsive technical support.


    1&1 is good for cheap .com registration, possible the cheapest, BUT for ASP.NET MVC imnsho 1&1 is useless.


    "You get what you pay for, sometimes more, often less!"


    Regards,
    Gerry (Lowry)

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes
Page 1 of 1 (15 items)