Page view counter

How to deploy MVC app to shared hosting?

Last post 06-26-2009 12:40 PM by Haacked. 12 replies.

Sort Posts:

  • How to deploy MVC app to shared hosting?

    03-28-2008, 10:31 AM
    • Loading...
    • Prem M
    • Joined on 03-22-2008, 3:16 AM
    • Posts 2
    • Points 0

    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
    • Loading...
    • mehfuzh
    • Joined on 09-28-2007, 3:02 PM
    • Posts 6
    • Points 312

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

    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
    • Loading...
    • philgeorge
    • Joined on 03-06-2008, 4:16 AM
    • Melbourne, Australia
    • Posts 3
    • Points 13

    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
    • Loading...
    • gyan_flip
    • Joined on 04-25-2008, 11:08 AM
    • बाघी - भोजपुर - बिहार - भारत
    • Posts 77
    • Points 129

    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
    • Loading...
    • gyan_flip
    • Joined on 04-25-2008, 11:08 AM
    • बाघी - भोजपुर - बिहार - भारत
    • Posts 77
    • Points 129
  • Re: How to deploy MVC app to shared hosting?

    05-03-2008, 7:02 AM
    Answer
    • Loading...
    • Prem M
    • Joined on 03-22-2008, 3:16 AM
    • Posts 2
    • Points 0

    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
    • Loading...
    • oazabir
    • Joined on 12-31-2005, 4:45 PM
    • Kuala Lumpur, Malaysia
    • Posts 7
    • Points 23
    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
    • Loading...
    • MrRadic
    • Joined on 11-08-2006, 7:13 PM
    • Posts 131
    • Points 285

    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
    • Loading...
    • teetee
    • Joined on 04-21-2006, 10:29 PM
    • Cleveland, OH
    • Posts 15
    • Points 8

     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
    • Loading...
    • you_rock
    • Joined on 07-17-2008, 2:11 AM
    • Posts 101
    • Points 268

    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
    • Loading...
    • Haacked
    • Joined on 09-17-2003, 10:43 AM
    • Posts 377
    • Points 4,901
    • 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?
Page 1 of 1 (13 items)