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. ASPHostCentral.com 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.


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

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:
     System.Web.Hosting.IProcessHostPreloadClient
    {
        
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.

<sessionState
  
mode="SqlServer"
  
sqlConnectionString="connection string here"
  
allowCustomerSqlDatabase="true"
  
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.

Response.RedirectPermanent("deadpage.aspx");


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

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

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

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



ASP.NET 4 Hosting :: URL Routing in ASP.NET 4 Framework

clock January 29, 2010 13:05 by author Administrator

URL routing was a capability we first introduced with ASP.NET 3.5 SP1, and which is already used within ASP.NET MVC applications to expose clean, SEO-friendly “web 2.0” URLs.  URL routing lets you configure an application to accept request URLs that do not map to physical files. Instead, you can use routing to define URLs that are semantically meaningful to users and that can help with search-engine optimization (SEO).

For example, the URL for a traditional page that displays product categories might look like below

http://www.mysite.com/products.aspx?category=software


Using the URL routing engine in ASP.NET 4 you can now configure the application to accept the following URL instead to render the same information:

http://www.mysite.com/products/software

With ASP.NET 4.0, URLs like above can now be mapped to both ASP.NET MVC Controller classes, as well as ASP.NET Web Forms based pages.  You can even have a single application that contains both Web Forms and MVC Controllers, and use a single set of routing rules to map URLs between them.

ASPHostCentral.com proudly announces that we are the first host to offer ASP.NET 4 Hosting with support of Entity Framework 4 to all our new and existing customers and you can start using this newest server from just as low as $4.99/month.

Response.RedirectPermanent() Method

It is pretty common within web applications to move pages and other content around over time, which can lead to an accumulation of stale links in search engines

In ASP.NET, developers have often handled requests to old URLs by using the Response.Redirect() method to programmatically forward a request to the new URL.  However, what many developers don’t realize is that the Response.Redirect() method issues an HTTP 302 Found (temporary redirect) response, which results in an extra HTTP round trip when users attempt to access the old URLs.  Search engines typically will not follow across multiple redirection hops – which means using a temporary redirect can negatively impact your page ranking.  You can use the SEO Toolkit to identify places within a site where you might have this issue

ASP.NET 4 introduces a new Response.RedirectPermanent(string url) helper method that can be used to perform a redirect using an HTTP 301 (moved permanently) response.  This will cause search engines and other user agents that recognize permanent redirects to store and use the new URL that is associated with the content.  This will enable your content to be indexed and your search engine page ranking to improve

ASP.NET 4 also introduces new Response.RedirectToRoute(string routeName) and Response.RedirectToRoutePermanent(string routeName) helper methods that can be used to redirect users using either a temporary or permanent redirect using the URL routing engine.  The code snippets below demonstrate how to issue temporary and permanent redirects to named routes (that take a category parameter) registered with the URL routing system.

You can use the above routes and methods for both ASP.NET Web Forms and ASP.NET MVC based URLs

Summary


ASP.NET 4 includes a bunch of feature improvements that make it easier to build public facing sites that have great SEO.  When combined with the SEO Toolkit, you should be able to use these features to increase user traffic to your site – and hopefully increase the direct or indirect revenue you make from them



Press Release :: ASPHostCentral.com launches ASP.NET 4 Beta 2 Hosting Program

clock November 18, 2009 13:48 by author Administrator

ASPHostCentral.com, an ASP.NET and Windows hosting provider, today announced the supports of ASP.NET 4 Beta 2 Framework hosting on our newest Windows Server 2008 R2 environment.

This ASP.NET 4 Beta 2 Framework will be offered until January 31, 2010 and we will soon replace with the newest full release of ASP.NET4. The Microsoft .NET Framework 4 redistributable package installs the .NET Framework runtime and associated files that are required to run and develop applications to target the .NET Framework 4. This download consists of a new Web-based installer that simplifies the installation process.

This unique opportunity is provided to all our new and existing customers and the cost to host ASP.NET4 Beta 2 project on our environment is priced at $4.99/month only. For more details about this product, please visit our Crystal Report product page at http://www.asphostcentral.com or http://www.asphostcentral.com/ASP-NET4-Hosting.aspx


 

About ASPHostCentral.com:
ASPHostCentral is a premier web hosting company where you will find low cost and
reliable web hosting services. Whether you're an enterprise level business or a small business entity or someone who just wants to host his own personal website - we have a suitable web hosting solution for you.
For more information, visit
http://www.ASPHostCentral.com



.NET4 Hosting :: .NET 4 Feature Focus - Code Contracts

clock November 17, 2009 07:34 by author Administrator

There are many new exciting things that we can find on the latest .NET4 Framework and one of them is the ability to use the “Code Contracts”. ASPHostCentral.com as a premier Windows and .NET Hosting provider, proudly announces that this latest framework has been supported on our entire new servers environment. You can start hosting your .NET4 Beta 2 website from just paying as low as $4.99/month with FREE 1 domain and 1 SQL 2005/2008

Design by contract builds on top of concepts like static typing, where certain actions cannot be performed unless it can be verified at compile time. Contracts usually take the form of pre- and post-conditions such as a parameter or return value never being null or only containing a certain range of values.

Rather than force developers to learn a whole new language such as Spec#, Microsoft is working on a language-agnostic library that can be leveraged by any .NET language. In some ways contracts look like assertions, but they are very different under the covers. Contracts are supported by a combination of static code analysis, which can be both inside and outside the compiler, as well as by testing frameworks. They are also executable, meaning they behave like assertions when running a debug build. Consider this first example:

string GetDescription(int x){

Contract.Requires(x>0);

Contract.Ensures(Contract.Result<string>() != null);

Looking at just the signature, developers only get the static type information "GetDescription requires an integer and returns a string". With the contracts, both developers and tools know "GetDescription requires a positive integer and returns a string that is never null".

In addition to explicit contracts, the contract checker can also support implicit contracts. One such example is division by zero. If a class includes a division of integers where the divisor is a variable, then all code paths must ensure that the variable is never zero or a warning is issued. If the variable in question is a property on a unsealed class, this would require checking in every subclass as well. There are also implicit contracts for dereferencing nulls and array indexes.

To make this easier, there is the concept of an ObjectInvariant method. This special method, which only contains contracts, is injected into the end of each method call to ensure the object's state remains consistent. It is important to note that this applies to all methods, including those in subclasses from other assemblies.

Another time saving device is easy access to old values. In this example the Ensures contract is used in conjunction with the OldValue syntax to make certain that the collection's count property is incremented.

Public Sub Add(value as Object)

Contract.Ensure(Count = Contract.OldValue(Count) + 1)

Even though the contract is written at the top of the method, it will automatically be moved to just before the Return statement by the compiler. As there is some overhead for storing the old value of Count, this sort of check will only occur in debug builds.

In order to support library developers, release builds include a reference assembly. For example, the Widgets.dll assembly would have the bulk of its contracts extracted and placed in the assembly Widgets.Contracts.dll. This allows client developers to use the faster release-style builds while still leveraging the contracts created by the library developers.

One of the more interesting features is that contracts do not just apply to concrete functions. Even interface and abstract methods with no other implementation detail can have contracts. This is done by creating a reference implementation of the interface whose sole purpose is to hold contracts. This reference implementation is linked back to the interface by attributes.

There are no restrictions on the contents of a contract. Since the same contracts are used for both static and runtime checking, a complex constraint that cannot be evaluated by one may still be checked by the other. Contracts can also be extracted by documentation generators.

 



.NET4 Hosting :: Overview of Microsoft .NET Framework 4

clock November 2, 2009 05:19 by author Administrator

The Microsoft .NET Framework 4 redistributable package installs the .NET Framework runtime and associated files that are required to run and develop applications to target the .NET Framework 4. This download consists of a new Web-based installer that simplifies the installation process. ASPHostCentral.com as a premier Windows and .NET Hosting provider, proudly announces that this framework has been supported on all our new servers environment. You can start hosting your .NET4 website from just paying as low as $4.99/month with FREE 1 domain and 1 SQL 2005/2008

Overview

The .NET Framework is Microsoft's comprehensive and consistent programming model for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of applications.

The .NET Framework 4 works side by side with older Framework versions. Applications that are based on earlier versions of the Framework will continue to run on the version targeted by default.

The Microsoft .NET Framework 4 provides the following new features and improvements:

·         Improvements in CLR and BCL

o    Performance improvement including better multicore support, background garbage collection, and profiler attach on server.

o    New memory mapped file and numeric types

o    Easier debugging including dump debugging, Watson minidumps, mixed mode debugging for 64 bit and code contracts.

·         Innovations in the Visual Basic and C# languages, for example statement lambdas, implicit line continuations, dynamic dispatch, and named/optional parameters.

·         Improvements in ADO.NET

o    Entity Framework, which simplifies how developers program against relational databases by raising the level of abstraction. The Entity Framework has many new features in the .NET 4 Framework. These features include persistence ignorance and POCO support, Foreign Key Associations, lazy loading, test-driven development support, functions in model, and new LINQ operators.

o    Data Services framework consists of a combination of patterns and libraries that enable the consumption of REST-based data services for the web. ADO.NET Data Services has many new features in the .NET 4 Framework. These features include: enhanced BLOB support, Data Binding, Row Count, Feed Customization, Projections, and Request Pipeline improvements. Built-in integration in Microsoft Office 2010 now makes it possible to expose Microsoft Office SharePoint Server data as a data service and access that data using the ADO.NET Data Services client library.

·         Enhancements to ASP.NET

o    New JavaScript UI Templates and databinding capabilities for AJAX.

o    New ASP.NET chart control.

·         Improvements in WPF

o    Added support for Windows 7 multi-touch, ribbon controls, and taskbar extensibility features.

o    Added support for Surface 2.0 SDK.

o    New line-of-business controls including charting control, smart edit, data grid, and others that improve the experience for developers who build data centric applications.

o    Improvements in performance and scalability.

o    Visual improvements in text clarity, layout pixel snapping, localization, and interoperability.

·         Improvements to Windows Workflow (WF) that enable developers to better host and interact with workflows. These include an improved activity programming model, an improved designer experience, a new flowchart modeling style, an expanded activity palette, workflow-rules integration, and new message correlation features. The .NET Framework 4 also offers significant performance gains for WF-based workflows.

·         Improvements to Windows Communication Foundation (WCF) such as support for WCF Workflow Services enabling workflow programs with messaging activities, correlation support. Additionally, .NET Framework 4 provides new WCF features such as service discovery, routing service, REST support, diagnostics, and performance.

·         Innovative new parallel-programming features such as parallel loop support, Task Parallel Library (TPL), Parallel LINQ (PLINQ), and coordination data structures which let developers harness the power of multi-core processors

 



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!

 

Calendar

<<  March 2024  >>
MoTuWeThFrSaSu
26272829123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Sign in