Is it possible to run the new ASP.NET MVC 2 Preview 2 on mono?
Yes. It was a bit tricky to compile from the ASP.NET MVC sources, but it works! See the screenshot.
However, this is not yet integrated/distributed with Mono. We will wait until the final release. If you want, I can upload the System.Web.Mvc.dll (2.0.0.0) I compiled and you can test it out (it needs to go in your app's bin folder until properly signed).
Update: The ASP.NET MVC2 code is now integrated in Mono (subversion trunk).
Related
Is there a way to convert a ASP.Net MVC 1 project build in VS2008 to ASP.Net MVC 5 and VS2015?
I tried to just open it in VS 2015 but that gave the error "This project is incompatible with the current version of Visual Studio".
There are ways to reference newer versions and update, eg:
http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2
.. however updating from MVC1 (especially if you cannot open the project) you probably don't want to manually install ASP.NET MVC installs etc (if that what I remember)
I would suggest creating a new MVC5 application, referencing MVC via Nuget etc and pulling in code as required. This will give you a chance to re-structure things and learn newer ways otherwise you my be fighting with MVC configuration and references.
I need to upgrade an application that runs on ASP.NET MVC 1 to ASP.NET MVC 4.
The new application still uses the Webforms Viewengine. It uses StructureMap for Dependency Injection.
If possible I would like to upgrade manually.
For upgrading from ASP.NET 1 to ASP.NET 2 I found the white paper
http://www.asp.net/whitepapers/aspnet-mvc2-upgrade-notes
The steps described in the document seem to be of little risk:
Fiddle with web.csproj
Replace Version=1.0.0.0 in web.config by Version=2.0.0.0
Reference System.Web.Mvc (v2.0.0.0) in the project
chnange bindingRedirect in web.config
update css and js files
What about upgrading to MVC 4: Will there be different steps involved?
You would follow a similar set of steps to upgrade to MVC 4. Microsoft has a whitepaper that outlines the steps required to manually upgrade a project from MVC 3 to MVC 4.
I have upgraded from 3 to 4 following these steps and it was a pretty simple and smooth process. Going from 1 to 4 is a bigger jump of course, so to minimize headaches you might want to individually upgrade 1->2, 2->3, 3->4: if you run into any breaking code changes it will be easier to identify how to resolve them. But fundamentally, all you're really doing is changing project GUIDs and referencing newer DLLs and such. It's not brain surgery.
To answer Ashok's question, MVC 4 is certainly deployable if you wish to use it today - my public blog is running it (on my own server). Use preview software at your own risk, of course.
My understanding is that MVC 4 is still in developer preview so a lot of features may and likely will change when the RC version is release. Since it is in dev preview is it even deployable as a live site?
I know ASP .NET MVC libraries are now being shipped with Mono but I cannot find exact version information.
Which exactly version of ASP.NET MVC is supported in the latest Mono release, Mono 2.10.1?
Copying from the release notes:
http://www.mono-project.com/Release_Notes_Mono_2.10#ASP.NET_MVC3_Support
See below for notes on Razor and
WebPages.
Although ASP.NET MVC3 is open source
and licensed under the terms of the
MS-PL license, it takes a few
dependencies on new libraries that are
not open source nor are they part of
the Microsoft.NET Framework.
At this point we do not have open
source implementations of those
libraries, so we can not ship the full
ASP.NET MVC3 stack with Mono (We still
ship ASP.NET MVC 1 and MVC 2 with Mono
for your deployment enjoyment).
This Mono release however has enough
bug fixes and patches that you will be
able to run ASP.NET MVC3 sites with
it.
Since these new dependencies were not
part of Microsoft.NET, they typically
are referenced in your project and
deployed in the bin/ directory of your
ASP.NET site. Make sure that you
remove the
Microsoft.Web.Infrastructure.dll
library from your site when deploying
to Mono, to allow Mono to use its own
implementation that integrates ASP.NET
MVC3 with Mono.
To run your web sites, use our 4.0
profile programs:
xsp4 for quick testing
mod-mono-server4.exe for Apache
hosting fastcgi-mono-server4.exe for FastCGI servers
Razor and WebPages
If you downloaded the Microsoft
binaries for ASP.NET MVC3, you will
have a few new libraries, the WebPages
framework that allows simple web sites
to be built and the Razor template
engine/
You can use both of those binaries
with Mono 2.10.
It is possible to get up and running
with Razor and cshtml just by
installing this release and running
xsp4 on any directory that contains
the bin/ assemblies and creating a
.cshtml file.
Just to be more concise:
Mono 2.10 ships with ASP.NET MVC2 (and also MVC1) out of the box. It is the actual Microsoft code.
ASP.NET MVC 3 should work if you include the assemblies in your project (See the release notes).
MonoDevelop will allow you to work with all of these but the 'new solution' scaffolding for ASP.NET MVC still builds the skeleton of an ASP.NET MVC1 app.
Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET.
First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following.
Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again.
As a result, the application ran smoothly.
I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so.
What the heck was going on exactly? Did I discover a new continent?
Perhaps your IIS is configured with a wildcard module mapping. With other words, the request path ".*" is being send to the asp.net ISAPI module.
My question is very simple. Can I run an ASP.NET MVC application on shared servers that has installed ASP.NET 3.5 but not MVC?
If this is possible could you tell me how?
You just need to include System.Web.dll in the bin folder and it should work fine (and maybe in the dll folder for routing. I'll check out for exact article for this in a moment).
Here's a link with proper a TODO.
Most interesting part:
With the release of ASP.NET MVC Beta, the assemblies distributed with ASP.NET MVC are automatically installed into the GAC.
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
While developing an application locally, this isn’t a problem. But when you are ready to deploy your application to a hosting provider, this might well be a problem if the hoster does not have the ASP.NET MVC assemblies installed in the GAC.
Fortunately, ASP.NET MVC is still bin-deployable. If your hosting provider has ASP.NET 3.5 SP1 installed, then you’ll only need to include the MVC DLL. If your hosting provider is still on ASP.NET 3.5, then you’ll need to deploy all three. It turns out that it’s really easy to do so.