This topic contains information about key features and improvements in the ASP.NET MVC. This topic doesn’t provide comprehensive information about all new features and is subject to change. So, if you seek more information about ASP.NET MVC, you can choose ASPHostDirectory as alternatives. You’ll get the best service at an affordable price. Only with @ 3.99/month, you can directly get the services you want. So, what are you waiting for? Try it!!

When you create a View for an ASP.NET MVC web application, you add an .ASPX or .ASCX file that uses the ASP.NET engine to render a combination of mark-up and code. Unfortunately, those Views don’t get compiled until IIS renders them for your web site which means that something as simple as a typo in a namespace could break your site. You could manually visit each and every view to verify that it compiles successfully or you could create automated UI tests that do it for you. Fortunately, there’s an easier way to verify your views at compile-time.

To let you detect these errors at compile time, ASP.NET MVC projects now include an MvcBuildViews property, which is disabled by default. To enable this property, open the project file and set the MvcBuildViews property to true, as shown in this example from the ASP.NET MVC Release Notes:

<PropertyGroup>
  <MvcBuildViews>true</MvcBuildViews>
</PropertyGroup>

Note that enabling this feature will add some overhead to your build process.

Unfortunately, this feature won’t work out of the box with TFS Build 2010 because of the way the post-build processing is done. If you look at the .csproj file for your ASP.NET MVC project, you’ll see an overridden AfterBuild target that invokes the AspNetCompiler task on your web application project’s sources. The problem here is two-fold:

1. The AfterBuild target shouldn’t be overridden directly since that’s reserved for end-user post-build processing.
2. The PhysicalPath attribute passed to the AspNetCompiler task needs to be updated to a value that will work both locally and on the build server.

Fortunately, both of these issues are easily resolved. In the example below, we’ve introduced a new BuildViews target that will only execute if the MvcBuildViews property is set to true. It also takes advantage of a new feature in MSBuild 4.0 that simplifies the task of injecting a custom target into the dependency chain. The AfterTargets attribute tells MSBuild to execute this target after the Build target has finished. For the PhysicalPath attribute on the AspNetCompiler task, we’ve used WebProjectOutputDir which is defined in Microsoft.WebApplication.targets as a location that resolves correctly for builds in both Visual Studio and TFS.

<Target Name=”BuildViews” Condition=”’$(MvcBuildViews)’==’true’” AfterTargets=”Build”>
   <Message Importance=”normal” Text=”Precompiling views” />
   <AspNetComplier VirtualPath=”temp” PhysicalPath=”$(WebProjectOutputDir)” />
</Target>

Note that after adding this custom target at an appropriate location in your web application’s project (.csproj) file (I’d recommend placing it just above the AfterBuild target, you’ll want to comment out the AfterBuild target.

Now, if you have an error in one of your views, it will show up as a compile-time error in Visual Studio and in your TFS builds. If you don’t want to take the performance hit of the additional compilation step, you can conditionally set the MvcBuildViews property to true for a specific configuration only (e.g. Release).

What is so SPECIAL on ASPHostDirectory.com .NET MVC Hosting?

We know that finding a cheap, reliable web host is not a simple task so we’ve put all the information you need in one place to help you make your decision. At ASPHostDirectory, we pride ourselves in our commitment to our customers and want to make sure they have all the details they need before making that big decision.

We will work tirelessly to provide a refreshing and friendly level of customer service. We believe in creativity, innovation, and a competitive spirit in all that we do. We are sound, honest company who feels that business is more than just the bottom line. We consider every business opportunity a chance to engage and interact with our customers and our community. Neither our clients nor our employees are a commodity. They are part of our family.

The followings are the top 10 reasons you should trust your online business and hosting needs to us:

- FREE domain for Life - ASPHostDirectory gives you your own free domain name for life with our Professional Hosting Plan and 3 free domains with any of Reseller Hosting Plan! There’s no need to panic about renewing your domain as ASPHostDirectory will automatically do this for you to ensure you never lose the all important identity of your site
- 99,9% Uptime Guarantee - ASPHostDirectory promises it’s customers 99.9% network uptime! We are so concerned about uptime that we set up our own company to monitor people’s uptime for them called ASPHostDirectory Uptime
- 24/7-based Support - We never fall asleep and we run a service that is opening 24/7 a year. Even everyone is on holiday during Easter or Christmast/New Year, we are always behind our desk serving our customers
- Customer Tailored Support - if you compare our hosting plans to others you will see that we are offering a much better deal in every aspect; performance, disk quotas, bandwidth allocation, databases, security, control panel features, e-mail services, real-time stats, and service
- Money Back Guarantee - ASPHostDirectory offers a ‘no questions asked’ money back guarantee with all our plans for any cancellations made within the first 30 days of ordering. Our cancellation policy is very simple - if you cancel your account within 30 days of first signing up we will provide you with a full refund
- Experts in .Net MVC Hosting
- Given the scale of our environment, we have recruited and developed some of the best talent in the hosting technology that you are using. Our team is strong because of the experience and talents of the individuals who make up ASPHostDirectory
- Daily Backup Service - We realise that your website is very important to your business and hence, we never ever forget to create a daily backup. Your database and website are backup every night into a permanent remote tape drive to ensure that they are always safe and secure. The backup is always ready and available anytime you need it
- Easy Site Administration - With our powerful control panel, you can always administer most of your site features easily without even needing to contact for our Support Team. Additionally, you can also install more than 100 FREE applications directly via our Control  Panel in 1 minute!

Happy Hosting!