ASP.NET 4.0 Hosting & ASP.NET 4.5 Hosting BLOG

BLOG about ASP.NET 4.5 Hosting, ASP.NET 4.0 Hosting and .NET 4.5 Framework and its Capabilities

ASP.NET 4 Hosting :: CORE Services in ASP.NET 4 Framework

clock February 12, 2010 06:34 by author Administrator

Microsoft Visual Studio 2010 and the .NET Framework 4.0 are the next generation development tools and platform for Windows Vista, the 2007 Office System, and the Web. as the premier Windows and ASP.NET Hosting provider has supported .NET4 Framework in all our hosting environments. The cost to host your .NET4 website/project is priced  as low as $4.99/month ONLY.

On this articles, we will present you the CORE Services that you can find on ASP.NET 4 Framework. You can certainly get this all CORE features on any hosting plans you choose.

The Core Services space has a list of new features as well including simplifying the web.config file, permanent page redirection, session state size reduction, expanding the range of allowable URLs, auto-start Web applications, and the list goes on. We’ll touch on a few here.

Auto-Start Web Applications

Some Web applications have extensive initialization code in the Application_Load method in the Global.asax file that needs to be executed before a site can process its first request. The new Auto-Start scalability featured is aimed at resolving this problem when running ASP.NET 4.0 on IIS 7.5 and Windows Server 2008 R2. Cold-starting IIS 7.5 or recycling an application pool causes IIS 7.5 to reference the applicationHost.config file to determine which applications to restart. Marking an application as auto-start informs IIS 7.5 that ASP.NET 4.0 needs to be notified to start the application.

Adding the following to the applicationHost.config file configures the TakeNoteAppPool application pool for auto-startup.

<add name="TakeNoteAppPool" 
startMode="AlwaysRunning"  />

If your application pool contains more than a single application, you can specify which applications get auto-started with the applicationHost.config file in Listing 1. When ASP.NET is in the pre-start state, the type defined in the preloadProvider section of the applicationHost.config file has its Preload method fired.

namespace WhatsNew40
public class MyInitializationCode:
public void Preload(string[] parameters)
// Code to run on app start up

When the PreLoad method completes, the application is ready to process incoming requests. The new auto-start feature solves the problem of making sure your Web application is ready to accept requests before the first visitor arrives.

Shrinking Session State

Session state can be stored out of process on another server or within SQL Server. Both of these approaches require that the session state information be transmitted across the network to the receiving server. ASP.NET 4.0 introduces a way to reduce the size of that session data by compressing and uncompressing it with the System.IO.Compression.GZipStream class with the compressionEnabled setting.

sqlConnectionString="connection string here"
compressionEnabled="true" />

Permanently Redirecting a Page

When you permanently relocate a Web page, you should return a HTTP 301 status code as well as a location header in the HTTP response of the relocated page. The HTTP 301 code will inform search engines and other user-agents that the page has permanently moved.

The new RedirectPermanent feature makes it easy to issue HTTP 301 status codes for permanently moved pages.


Extensible Output Caching

In its simplest forms, caching allows you to store generated HTML pages in memory. This speeds up response time when cache pages are requested since the entire page lifecycle for the page does not have to be processed. The problem with this approach is that all these items are being stored in your Web server’s memory-memory that may be at a premium for sites with heavy traffic volume

This new feature provides a way for storing those cached HTML assets in any storage mechanism you choose. A custom output cache provider is created as a class deriving from System.Web.Caching.OutputCacheProvider. A web.config entry in the new providers section of the outputCache element contains the details for your new class

Web.config Goes on a Diet

With all the features that have been added to ASP.NET over the years, it was inevitable that the web.config would swell in size. Add in the new features in ASP.NET 4.0 such as routing, AJAX, outputCaching Providers and so on, and the swelling continues. New to ASP.NET 4.0 is the moving of major configuration settings into the machine.config file with applications inheriting these settings.

This allows an application to simply not have a web.config file or to have a very simple one like this one specifying the framework version being targeted.

Listing 1: applicationHost.config file settings for Auto-Start

<site name="MainSite" id="1">
<application path="/"
preloadProvider="AutoLoadData" >
<!--  //Additional application settings here// -->

<!-- //Additional settings here// -->

<add name="AutoLoadData "
type="WhatsNew40.MyInitialzationCode, WhatsNew40" />

ASP.NET 4 Hosting :: What's NEW in Visual C# 4.0?

clock February 8, 2010 06:18 by author Administrator

Visual C# version 4.0 offers new features that make it easier for you to work in dynamic programming scenarios. Besides dynamic programming, you have support for optional and named parameters, better COM interop support, and contra-variance and covariance. This article will show you how each of these features work and provide suggestions of how they can be applied to help you be more productive.

To help you follow the path of C#, this article looks at the history of C#, today’s use of C#, and helps you understand the future of C# and what the language intends to provide for you. After you understand the theme of C# 4.0, you’ll learn about the new features of C# 4.0. Finally, this article will show you how to create a dynamic object of your own with late-bound calls to dynamic methods based on conventions.

C#: Then and Now

The previous major versions of C# were 1.0, 2.0, and 3.0. There was a minor version 1.1 in April of 2003, but it didn’t significantly change the theme of the 1.0 release.

Microsoft first announced C# on June 16th 2000. It was the first high-level programming language that was built specifically to target the .NET Common Language Runtime. C# 1.0 grew its heritage from C++, but borrowed features from languages such as Delphi, Java, and others. In C# 1.0, Microsoft planned to provide an object-oriented, component-based language that was very simple to use. When Microsoft released C# 1.0 to manufacturing on February 13th 2002, it was an immediate hit and steadily grew in popularity

When C# 2.0 rolled around, Microsoft finally added all of the features that should have been in C# 1.0. For example, generics was huge and is an important part of .NET development today. C# 2.0 also introduced anonymous methods, iterators, and nullable types. An interesting addition to C# 2.0, nullable types was a pre-cursor feature for what was coming in the next version, focusing on data

Most developers work with data, which was the primary theme of C# 3.0. The largest C# 3.0 language addition was Language Integrated Query (LINQ). Most other language features added in C# 3.0 were primarily to support LINQ, but the new features; including implicitly typed local variables, anonymous types, object and collection initializers, lambdas, and extension methods, can have value on their own in development that doesn’t involve LINQ

The next version of C# will be 4.0, which is the focus of this article. C# 4.0 will primarily focus on dynamic programming. The following sections of this article explain the dynamic programming features of C# 4.0 as well as other new features such as optional/named parameters and covariance/contravariance

Why Dynamic Programming?

The dynamic programming story in C# can fall into fulfilling categories of need in the way of multiple-language integration, simpler reflection, access to HTML DOM in Web scenarios, and easier COM interop. Some of these categories of need might not apply to your particular situation, and that’s okay because there isn’t anything that says that you have to use a language feature just because it’s there.

Most C# developers use multiple tools in a single application to accomplish complex tasks. If you’re writing WPF desktop applications, you’re using C# and XAML. It is quite possible that you might find some open source code that solves a problem, but it might be written in another language such as VB or F#. One of the benefits of .NET since its inception is the ability to have cross-language interoperability and the runtime is even called the “Common Language” Runtime (CLR). In recent years, Microsoft has created dynamic languages, such as IronRuby and IronPython, but developers don’t have an easy way to perform interop with dynamic languages. If you have this need, then you’ll welcome the ease with which C# dynamic programming makes interop between C# and dynamic languages possible

When performing reflection to run a method on an object, there are several hoops to jump through, including obtaining a reference to an object type, getting a reference to a member info object, determining the type of bindings to use, and then invoking the member. While reflection has an undeniable coolness factor, it still feels like a hack and that’s where C# 4.0 dynamic methods can help

If you write Silverlight applications, you might have the need today or in the future to access the HTML DOM containing your Silverlight control. C# dynamic programming makes this task easier

Performing COM interop with C# has always been cumbersome; partly because of the need to write extra syntax for conversions, optional parameters, and more. This has left some C# developers with a touch of VB envy because VB has easier COM interop support. One of the purposes of dynamic programming in C# is to help the C# programmer write cleaner syntax in COM interop scenarios

Where do you go for Visual C# 4.0 Hosting?

Basically, you need to look for a host that supports ASP.NET 4.0 Hosting. is the premier ASP.NET 4 Hosting provider and you can always start from as low as $4.99/month to host your first Visual C# 4.0 project.

ASP.NET 4.0 & ASP.NET 4.5 Hosting


ASPHostCentral is a premier web hosting company where you will find low cost and reliable web hosting. We have supported the latest ASP.NET 4.5 hosting and ASP.NET MVC 4 hosting. We have supported the latest SQL Server 2012 Hosting and Windows Server 2012 Hosting too!



<<  May 2017  >>

View posts in large calendar

Sign in