I read in a few places that MVC requires Windows Server 2008 for full support. Can the same be achieved on a Vista Ultimate dev machine or will some things be missing?
If you have worked with MVC, have you had trouble finding relatively inexpensive hosting for Windows Server 2008? Though hosting is not as big a concern for me right (I know I will find some) as needing a dev machine with 2008 Server.
ASP.NET MVC plays nicely with Server 2008, but this is not required. The main crux to not using Server 2008 (IIS 7) is that you will need some form of url rewriter, otherwise Server 2003 (IIS 6) will not know that you are trying to execute an asp.net app.
What you can do is use the mod_rewrite isapirewrite with IIS 6 and you are good to go.
Steve Sanderson wrote a good article here that details how to implement several options, with mod-rewrite being the 'cleanest' solution.
What do you consider "full support"?
Phil Haack has a very good post on getting MVC up and running on IIS6 - and there are a number of other questions around here on running MVC on a non-IIS7/win2k8 set-up - you certainly don't need to use something like ISAPI-rewrite or other things - it seems rather excessive to have two routing engines in your set-up - and if you're looking for a "relatively inexpensive host" are they going to have/allow something like ISAPI-Rewrite installed and available?
As for development, I've had no problems running developer environments on both XP Professional and Vista Home Premium (which comes with IIS7 if you add the bits yourself from Windows Components).
The MVC bits "require" IIS7 running in Integrated mode more than they require Windows 2008. As IIS7 is present on Vista you're pretty much good to go, provided you configure it right.
(I know my host, DiscountASP.NET (insert referral code here obviously) have IIS7 and the MVC bits all ready to go)
Related
Is it possible to self host asp.net mvc inside another application ie. console, windows forms, service etc etc.
I'd like to build an app that offers a web interface to control it and I'd like to use asp.net mvc for the web part of it.
I did take a quick look at Nancy which looks like it would work, though its not asp.net mvc it did support razor although it doesn't have quite the same level of support for it as asp.net (eg. strongly typed views)
I did also find this question but it doesn't really go into much depth
Possible to use ASPNET MVC2 without IIS?
You can use "IIS 7.0 Hostable Web Core" and host the web server as part of any user process, even a console application. The benefit is that it is very similar to full blown IIS (incl config etc) but the web server itself is running in your process.
Have a look at the following articles:
Host your own Web Server in your application using IIS 7.0 Hostable Web Core
Creating Hosted Web Core Applications
Please have a look at http://cassinidev.codeplex.com/
It has many advantages for example
No need IIS 7 on client machine
Support MVC (I have tested myself)
Work well with Windows Form and Web Browser Control for packaging as Windows App
Cross Win OS platform ( Windows XP, Vista, 7) I have test XP with .NET 4 installed
Hope this helps.
I know this question is old, but it is still relevant, so with the .NET Core 1.0 + ASP.NET MVC 6 you can self-host your MVC application easily. You can even combine MVC and WebAPI applications into one, and you can decide later if you want to use IIS, IIS Express or the self-hosting feature of the .NET Core.
You can try it if you follow the Yeoman approach from this post:
https://stackoverflow.com/a/30314393/980247
I've a ASP.NET MVC 2 project that runs fine under Windows 7 and will start on Windows XP if I use the Visual Studio Development Server, however, starting under IIS generates an error:
Unable to start debugging on the web server
With the message
The specified procedure could not be found
No errors in the system event viewer.
If I start without debugging I get an "HTTP 500 Internal Server Error"
The reason I run it under IIS is the project also includes some WCF wsHttp web services that use certificates, so the VS Development Server is not adequate for hosting those.
I have already seen the links on SO that talk about adding the wildcard mapping. I've already done that, just as I've done on Windows Server 2003 where I successfully host ASP.NET MVC RC2 for quite a while.
See if this helps - its possible but not ideal:
http://blogs.microsoft.co.il/blogs/dorony/archive/2007/12/15/using-asp-net-mvc-on-iis-5.aspx
Check out this blog it might help. IIS 6 and under does not easily support MVC Routing.
http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx
The error said "procedure could not be found" so I double checked the ISAPI dll.
Turns out when I added the wildcard mapping to ISAPI, I picked aspnet_filter.dll instead of aspnet_isapi.dll. Once I switched it, the app starts up fine and serves pages fine.
I was lead to believe that MVC apps were BIN-deployable, so could be deployed to any ASP.net 3.5 compatible server. I'm trying to deploy to a Windows Server 2003 x64 with 3.5 (no SP1) and am having trouble getting it working.
I get the following when hitting the homepage, which redirects to the /Account/LogOn view due to our app config.
The page cannot be found
I've got the three (plus Extensions, I can't remember why) MVC dll's set to Copy Local, so they end up in the bin-folder. I'm publishing and then copying over the app to the server:
System.Web.Abstractions.dll
System.Web.Mvc.dll
System.Web.Routing.dll
System.Web.Extensions.dll
Does anyone know what I'm doing wrong? The app works on another machine we have with 3.5 SP1, and on development machines, also SP1 and with MVC installed.
I've gone over everything I can think of, ensured the permissions are correct, etc.
IIS 6 does not handle .mvc extensions correctly. Among other things you have to map .mvc to the ASP.NET handler. Here is a walkthrough for you: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Have you set up wildcard mapping on the server that does not work? See "Deploying ASP.NET MVC to IIS 6" for an example. You basically need to map all requests to the ASP.NET ISAPI DLL and tell IIS not to try to verify that the file exists. Don't know if that's your issue, but it has bitten me a few times in deployments.
With IIS6, you can't do extensionless URLs like /Account/LogOn. You have to do something like /Account.aspx/LogOn The ".aspx" can really be almost any arbitrary extension, but you need that extension. Your routes need to take the extension into account as well.
Check to make sure the app pool your site is running under is configured to run ASP .Net 2.0, sometimes it defaults to 1.1 which causes issues similar to yours.
Does ASP.NET MVC require IIS? Could I develop an application that uses the new ASP.NET MVC framework on a client machine that does not have IIS installed?
From what i've read on the Mono site Site Link you can also run an asp.net MVC site under Mono using the Apache webserver as well.
A browser is all that is required on the client machine.
IIS is not required on the developer machine according to the download page.
Visual Web Developer 2008 Express, or the regular editions of Visual Studio will include the Cassini web server for development.
I think what you're asking is if you were to develop an ASP.NET MVC application would you need IIS on your local dev machine to run it?
The answer is, no you don't.
In short ASP.NET MVC can technically be run by any web server that can allow the website itself to handle the requests instead of the web server handling them.
You need IIS to get ASP.NET to work (MVC or WebForms). From what I know, it is ideal to have IIS 7 for MVC, but it is possible with IIS 6.
Developing a MVC application without IIS is possible, with the built-in web server integrated with VS 2008 (as been already mentioned), but for deployment, that is when you need IIS.
Let's assume we're talking about the recently released Beta version. Specifically I'm interested in a step-by-step tutorial or similar, and I'd be thrilled with information addressing how to do so on CrystalTech.
Ultimately you want a hosting environment that uses Windows Server 2008 / IIS7, which allows you configure things like mappings through the web.config rather than through IIS itself.
Failing that, your only choice is to either ask CrystalTech to enable ASP.NET wildcard mapping to your website or just stick with using .mvc extensions in your URLs.