Last week we released several new web products – including ASP.NET MVC 3. We’ve had a bunch of great feedback and a ton of downloads since then.One question a few people have asked me recently is: “My web hosting provider doesn’t yet support ASP.NET MVC 3 - any idea when they will install it?” The good news is that you don’t need to wait for them to install anything on their web-servers. As long as your web hosting provider supports .NET 4, then you can build and deploy ASP.NET MVC 3 applications on it today – without the hosting provider having to do anything to enable it. The below post describes how you can enable this. Some BackgroundWe support two ways for you to install and use the assemblies that implement ASP.NET MVC 3 on a machine:Have the ASP.NET MVC 3 assemblies installed in a central place on a machine, and have web projects reference/use the assemblies from there
Copy the ASP.NET MVC 3 assemblies into the \bin folder of your web project, and have your web project reference/use the assemblies from there
The first approach is the default approach we use with Visual Studio, and has the benefit of enabling us to easily service the ASP.NET MVC 3 assemblies using Windows Update (in the event of a bad bug). The second approach is also fully supported, and has the benefit of not requiring ASP.NET MVC 3 to be explicitly installed on a machine in order for it to be used. Instead you can just copy/ftp your web application onto a server (with the ASP.NET MVC assemblies contained within the \bin directory of the application) and it will just work. You should use this second approach if your web hosting provider hasn’t explicitly installed ASP.NET MVC 3 yet on their servers. Approach 1: GAC Based Referencing of ASP.NET MVC AssembliesWhen you install ASP.NET MVC 3 on a machine, a number of assemblies are automatically registered in the GAC (global assembly cache) as part of the installation process. The GAC provides a central place that .NET assemblies can be installed and serviced (via Windows Update). Because it provides an easy way for us to update/service assemblies, ASP.NET MVC projects - by default - reference the assemblies that implement ASP.NET MVC 3 from it. Read more: ScottGu's Blog
Copy the ASP.NET MVC 3 assemblies into the \bin folder of your web project, and have your web project reference/use the assemblies from there
The first approach is the default approach we use with Visual Studio, and has the benefit of enabling us to easily service the ASP.NET MVC 3 assemblies using Windows Update (in the event of a bad bug). The second approach is also fully supported, and has the benefit of not requiring ASP.NET MVC 3 to be explicitly installed on a machine in order for it to be used. Instead you can just copy/ftp your web application onto a server (with the ASP.NET MVC assemblies contained within the \bin directory of the application) and it will just work. You should use this second approach if your web hosting provider hasn’t explicitly installed ASP.NET MVC 3 yet on their servers. Approach 1: GAC Based Referencing of ASP.NET MVC AssembliesWhen you install ASP.NET MVC 3 on a machine, a number of assemblies are automatically registered in the GAC (global assembly cache) as part of the installation process. The GAC provides a central place that .NET assemblies can be installed and serviced (via Windows Update). Because it provides an easy way for us to update/service assemblies, ASP.NET MVC projects - by default - reference the assemblies that implement ASP.NET MVC 3 from it. Read more: ScottGu's Blog
0 comments:
Post a Comment