Sharing ASP.NET MVC applications - asp.net-mvc

Like everybody else on this planet, I am currently working on a blogging engine using ASP.NET MVC .
I am planning to make this open source under GPL, with a requirement that people already have ASP.NET 3.5 already installed on their machines. Let us say that they do not already have ASP.NET MVC installed (on a shared host)
But, I would like them to host my application inspite of that.
I found this interesting post here by Haack http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx, which suggests to include the below references in Bin directory
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
My question is, Is it legal for me to include these assemblies in the bin directory when sharing the application?
Thanks,
Chandra

Yes it is. These are redistributable assemblies.
The license is MS-PL, an open source license from Microsoft that allows redistribution.
http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx
The only catch is that it's not compatible with GPL, so you may want to think of using a different open source license for your project.

Since ASP.NET MVC is released under the Microsoft Public License, you can read more here http://www.opensource.org/licenses/ms-pl.html
I'd say that'd be perfectly legal. It is open source after all.
You can also read some more about the license here: http://www.opensource.org/licenses/ms-pl.html

Related

Which version of ASP.NET MVC ships with Mono 2.10?

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.

How do you install Castle Windsor IOC?

I'm currently reading Pro ASP.NET MVC Framework by Sanderson. In the book he recommends setting up IoC using Castle Windsor, and he points out that the download automatically installs it and registers the Castle DLLs in the GAC. Well, at this point in time (5/4/2010), the Castle Project no longer has a downloadable installer that sets this up. Its all broken out into their individual subprojects with the raw files contained in zipped folders. Sadly there's no installation documentation that I can find about how to set it up. Being the noob that I am, I'm stuck and now forced to ask #1 where should castle windsor live on my hard drive? #2 how do I manually register the dlls properly? And, #3 should I be angry at the project maintainers for their oversight?
Here's the link:
http://www.castleproject.org/castle/download.html
Sanderson's book is already somewhat outdated about the Castle - ASP.NET MVC integration.
There is no oversight here really, the Castle developers team decided that the project was getting too big to be efficiently managed, so they split it. So now each of these new projects ships as a separate bundle, which includes the necessary DLLs.
There is no installer because it's really not necessary. As with most open source .Net libraries (like NHibernate, log4net, Rhino.Mocks, Moq, and lots others) you get the DLL, put it in some directory in your project (most people call it lib or Dependencies), then from your project you add a reference to the DLLs in this directory. No need to mess with the GAC at all.
You also need to get MvcContrib (the one that says MVCContrib.Extras.release.zip), which implements the Windsor - ASP.NET MVC integration (controller factory and extensions to register controllers, among other things). In fact, MvcContrib already includes Windsor so that's all you really need.
You are looking for the Castle MicroKernel/Windsor project: http://www.castleproject.org/container/index.html
Here is a link to the "Getting Started" page:
http://www.castleproject.org/container/gettingstarted/part1/index.html
Once you have downloaded the ZIP file, extract it to a known location on your hardrive (inside the Visual Studio solution directory is normal).
Follow the "Getting Started" guide, it steps you through which DLL's to reference in your project, and how to use it
Good luck!

Run ASP.NET MVC in Internet Hosting Providers

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.

Visual Studio 2008: Synchronizing project structure with underlying file structure

Is there a way of making the (ASP.NET MVC) project structure reflect the underlying physical directory in the same way as ASP.NET Website projects are treated? - so you don't have to explicitly add files that are already in place via the Solution Explorer too.
Thanks
Solved the problem by using Chris Pietschmann's instructions to Convert an ASP.NET MVC application to a website project.
Though it looks like I'll lose some of the suppport features for ASP.NET MVC built into Visual Studio by doing this..

Install ASP.Net MVC without administrator rights?

Unfortunately, my company's IT policy doesn't allow me admin privileges to my own machine. However, I want to start working ASP.Net MVC; but the installer won't install the framework w/o admin rights. Is there anyway I can install MVC manually; like copying relevant DLLs somewhere, etc. Any constructive advice is greatly appreciated.
You can download & compile ASP.NET MVC yourself - and either include it as a referenced project, or just grab the resulting binaries and add them to your project like any other DLL.
Look for the link to MVCBetaSource.zip on this page - it's a pretty straightforward build using Visual Studio, and (if I recall correctly) includes the few binaries (System.Web.Abstractions and System.Web.Routing) that aren't part of the MVC source itself.
As of preview 3 or 4, ASP.Net MVC became binnable. What I've done in my solutions is have a 'binary references' folder at the root of the solution and make references to those local files in each project that needs them. You should copy:
System.Web.Abstractions.dll
System.Web.Mvc.dll
System.Web.Routing.dll
Once done, refer to these assemblies and things should work just fine. The biggest hurdle you face is extracting them from the MSI.
MVC is bin deployable, so if .Net 3.5 is installed with SP1 you should be good. Just make sure you mvc dll gets put in your bin folder and deploys out. The tricky part is the wildcard in IIS6, IIS7 will do this automatically but for 6 you need to make a rule, good luck.

Resources