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 ?
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.
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 ?
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.
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
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.
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!
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:
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 ?
Member
11 Points
36 Posts
Shared hosting and ASP.NET MVC
Mar 22, 2008 10:32 AM|ksachdeva17|LINK
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
Member
7 Points
66 Posts
Re: Shared hosting and ASP.NET MVC
Mar 22, 2008 11:48 AM|tangle|LINK
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
Participant
818 Points
392 Posts
Re: Shared hosting and ASP.NET MVC
Mar 22, 2008 02:58 PM|Haacked|LINK
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}
Senior Program Manager, Microsoft
What wouldn’t you do for a Klondike bar?
Member
11 Points
36 Posts
Re: Shared hosting and ASP.NET MVC
Mar 22, 2008 07:03 PM|ksachdeva17|LINK
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
Member
675 Points
230 Posts
Re: Shared hosting and ASP.NET MVC
Mar 23, 2008 07:50 AM|srulyt|LINK
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.
ASP.NET MVC iis7
Member
20 Points
7 Posts
Re: Shared hosting and ASP.NET MVC
Jun 30, 2008 04:48 AM|oazabir|LINK
ASP.NET MVC
Omar AL Zabir
http://omaralzabir.com
None
0 Points
1 Post
Re: Shared hosting and ASP.NET MVC
Aug 09, 2008 09:18 PM|SpeedBump|LINK
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
Member
25 Points
88 Posts
Re: Shared hosting and ASP.NET MVC
Oct 14, 2008 06:27 AM|FoolongC|LINK
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.
Member
24 Points
74 Posts
Re: Shared hosting and ASP.NET MVC
Oct 14, 2008 02:39 PM|f00sion|LINK
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.
Member
10 Points
8 Posts
Re: Shared hosting and ASP.NET MVC
Oct 15, 2008 05:55 AM|shunzimm|LINK
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!
Member
196 Points
126 Posts
Re: Shared hosting and ASP.NET MVC
Oct 16, 2008 02:56 PM|MikeBosch|LINK
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
http://weblogs.asp.net/mikebosch
*** Please MARK this post as ANSWERED, if you find it helpful) ***
None
0 Points
21 Posts
Re: Shared hosting and ASP.NET MVC
Aug 06, 2009 02:57 PM|Aspfree.com|LINK
Maybe you need classic pool
Recommend shared mvc hosting
http://www.webhost4lifereview.com/asp.net-mvc-hosting/
ASP NET MVC Hosting Webhost4life4lifeReview.com