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. [:)]
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
ASP.NET MVC
Regards,
Mehfuz
Marked as answer by ricka6 on Jun 26, 2009 09:40 PM
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
Marked as answer by ricka6 on Jun 26, 2009 09:40 PM
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
Marked as answer by Haacked on Jun 26, 2009 04:40 PM
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
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 [url=http://support.reliablesite.net]support.reliablesite.net[/url] or by e-mailing support@reliablesite.net
Prem M
0 Points
2 Posts
How to deploy MVC app to shared hosting?
Mar 28, 2008 02:31 PM|LINK
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. [:)]
Thanks,
Prem
ASP.NET MVC Shared Hosting Deployment
mehfuzh
Member
487 Points
6 Posts
Re: How to deploy MVC app to shared hosting?
Apr 13, 2008 01:24 PM|LINK
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
ASP.NET MVC
Mehfuz
srulyt
Participant
1073 Points
230 Posts
Re: How to deploy MVC app to shared hosting?
Apr 13, 2008 02:47 PM|LINK
DotNet experience is important but you don't have to know asp.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
philgeorge
Member
15 Points
4 Posts
Re: How to deploy MVC app to shared hosting?
May 01, 2008 11:55 PM|LINK
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
gyan_flip
Member
129 Points
77 Posts
Re: How to deploy MVC app to shared hosting?
May 02, 2008 09:39 AM|LINK
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_flip
Member
129 Points
77 Posts
Re: How to deploy MVC app to shared hosting?
May 02, 2008 09:42 AM|LINK
Read the post : Routing with IIS6.0 with extension mapping - requires .mvc.aspx on hosted domain
Prem M
0 Points
2 Posts
Re: How to deploy MVC app to shared hosting?
May 03, 2008 11:02 AM|LINK
Thanks to all who replied.
srulyt's tip is correct. I had not enabled integrated pipeline. Once I did that, it started working.
oazabir
Member
35 Points
8 Posts
Re: How to deploy MVC app to shared hosting?
Jun 30, 2008 08:47 AM|LINK
ASP.NET MVC
Omar AL Zabir
http://omaralzabir.com
MrRadic
Member
303 Points
142 Posts
Re: How to deploy MVC app to shared hosting?
Feb 20, 2009 02:08 PM|LINK
Glad you got it resolved, if you have additional questions you can also submit a ticket at either [url=http://support.reliablesite.net]support.reliablesite.net[/url] or by e-mailing support@reliablesite.net
teetee
Member
71 Points
71 Posts
Re: How to deploy MVC app to shared hosting?
Mar 07, 2009 03:29 AM|LINK
Check this link: http://www.asp.net/learn/mvc/tutorial-08-cs.aspx