Run ASP.NET MVC in Internet Hosting Providers - asp.net-mvc

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.

Related

Is MVC4 baked into .NET 4.5?

A lot of release notes for Visual Studio 2012 talk about .NET 4.5 and MVC4, but I can't tell if MVC4 is actually part of the .NET 4.5 release. Anybody know for sure? I would love not to have to install MVC separately on my server.
No, ASP.NET MVC 4 is baked into VS2012, exactly the same way ASP.NET MVC 3 was baked into VS2010 but not part of .NET 4.0 (there was a separate download that you could install on your servers). But there will also be a separate download of ASP.NET MVC 4 for VS2010 SP1 in which you obviously won't be able to use the .NET 4.5 specific features, such as async/await, but you will still be able to develop an ASP.NET MVC 4 application and target .NET 4.0.
ASP.NET MVC has made a point of NOT being tied to a particular .NET incarnation. That way, you can use the latest and greatest irrespective of what .NET version your hosting provider uses.
If the provider supports ASP.NET, that's all you need to know.
For this precise purpose, ASP.NET MVC is bin-deployable, meaning you can deploy the MVC dlls yourself, along your application - without requiring special rights from the hosting provider.
Phil Haack has a great article describing how to bin-deploy MVC3. There's even tooling support in VS for this scenario!
I assume the workflow for newer MVC incarnations is similar.

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.

Odd Things of ASP.NET MVC Deployment on IIS 6

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.

Is it possible to run an ASP.NET 3.5 MVC 1.0 app on a server that supports ASP.NET 2.0 only?

My host supports
ASP
ASP.NET v1.0/2.0
ASP.NET Ajax
Access Database Support
MS Server Database Support (SQL Server)
I know by copying some of the files it's possible to run a .NET 3.5 Windows Forms application without .NET 3.5 installed on the client. Does the same hold for ASP.NET 3.5 MVC 1.0? Does MVC 1.0 support .NET 2.0?
My host is Go Daddy in case it helps or matters.
Mostly. Scott Hanselman has an article describing exactly how to do this. He notes:
This workaround is offered with exactly zero warranty or support. It's as-is, just an FYI on the blog. If this hack deletes files or kills your cat, you have been warned. No whining.
In practice, no one really knows what might break. Microsoft didn't test this.
This just flat might not work for you. Sorry.
The trick:
You can copy System.Core from your .NET 3.5 development machine (this is the machine running VS2008 that you're developing on) to the /bin folder on your .NET 2.0 SP1 machine. It's gotta be running .NET Framework 2.0 SP1 or this won't work. System.Core is probably somewhere around "C:\windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089" on your machine, but you're a bad person for even asking.

Does ASP.NET MVC need to be installed on my production web server?

My IT folks don't like to install software on their precious servers unless they must. To that extent, does the server that serves my ASP.NET MVC application need to have the MVC 1.0 Framework on it in addition to .NET 3.5 sp 1 Framework?
Nope. You can deploy the System.Web.Mvc.dll to your application's bin directory if MVC has not been installed on the server. The only requirement is that the server have .NET Framework 3.5 (preferably with SP1)
Phil Haack put together an article on bin deploying MVC apps here. It mentions the ASP.Net MVC beta drop, but it still works just fine (given the caveat that .Net 3.5's installed).

Resources