Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

Tutorial and Articles about Windows Hosting, SQL Hosting, MVC Hosting, and Silverlight Hosting

Free ASP.NET hosting - ASPHostPortal.com :: ASPHostPortal.com Proudly Announces Free Trial Windows ASP.NET Hosting

clock October 3, 2013 10:28 by author Ben

ASPHostPortal.com is a premier Windows and ASP.NET Web hosting company that specializes in Windows and ASP.NET-based hosting. We proudly announces 7 Day Free Trial Windows and ASP.NET Hosting to all new customers. The intention of this FREE TRIAL service is to give our customers a "feel and touch" of our system. This free trial is offered for the next 7 days and at anytime, our customers can always cancel the service.

 

The 7 Day Free Trial is available with the following features:

- Unlimited Domains
- 5 GB Disk Space
- 60 GB of Bandwidth
- 2 MS SQL Database
- Unlimited Email Account
- Support ASP.NET 4.5
- Support MVC 4.0
- Support SQL Server 2012
- Free Installations of ASP.NET And PHP Applications

ASPHostPortal.com believes that all customers should be given a free trial before buying into a service and with such approach, customers are confident that the product / service that they choose is not faulty or wrong. Even we provide free trial service for 7 days, we always provide superior 24/7 customer service, 99,9% uptime guarantee on our world class data center. On this free trial service, our customer still can choose from our three different data centre locations, namely Singapore, United States and Amsterdam (The Netherlands)

Anyone is welcome to come and try us before they decide whether or not they want to buy. If the service does not meet your expectations, our customer can simply cancel before the end of the free trial period.

For all the details of packages available visit ASPHostPortal.com

About ASPHostPortal.com:

ASPHostPortal.com is a hosting company that best support in Windows and ASP.NET-based hosting. Services include shared hosting, reseller hosting, and sharepoint hosting, with specialty in ASP.NET, SQL Server, and architecting highly scalable solutions. As a leading small to mid-sized business web hosting provider, ASPHostPortal strive to offer the most technologically advanced hosting solutions available to all customers across the world. Security, reliability, and performance are at the core of hosting operations to ensure each site and/or application hosted is highly secured and performs at optimum level.



ASP.NET Hosting :: Using ADO.NET Entity Framework 4.1 with SQL Server Compact 4.0

clock September 30, 2013 07:01 by author Mike

ADO.NET Entity Framework, an object-relational mapper (ORM) built into the .NET framework, provides an easy way to map your classes into a database tables and vice versa.

SQL Server Compact (CE)
Yet another useful small scale tool. Of course you can map your entities into a full robust database. There are a number of pre-built providers, not counting Microsoft SQL and SQL Express (the default). I've chosen to use MS SQL Server Compact as a first option (later to be replaced or give the user/administrator the option to set a different provider) mainly because it's super-lightweight, builds the database in a file, and does not require heavy installation and licenses. It's free and is supported by mobile devices. For small applications it may be sufficient. For larger scale apps perhaps not so much.

Prerequisites checklist

  • ADO.NET Entity Framework 4.1, available here.
  • Microsoft SQL Server Compact 4.0, available here.
  • MS SQL Server CE has no fancy management application (like MS SQL Server Management Studio for more robust SQL Server versions) and it is not natively browsable from Visual Studio. 
    However, in order to query your tables and see what's going on, I recommend using SQL Server Compact Toolbox Visual Studio extension, available here.
    Mind you that in order for it to run properly, you will need to have both SQL Server CE 4.0 (from the link above) and the SQL Server CE 3.5 SP2 runtime from here installed on your machine.
    If you are running a 64 bit version of Windows, you will have to download, extract and install both the 32 bit and the 64 bit versions of the SQL Server CE 3.5 SP2.

Project references
Once all prerequisites are in place, the following assembly references are to be added to the project:

  • EntityFramework
    Should reside in the folder where the Microsoft ADO.NET Entity Framework 4.1 has been installed. By default it would be something like:
    C:\Program Files (x86)\Microsoft ADO.NET Entity Framework 4.1\Binaries\
  • System.ComponentModel.DataAnnotations
    This is required in order to use data attributes for annotating your persisted class properties, such as [Key] to denote a primary key property.

Code first: Data classes
The approach I'm implementing here assumes you have the data classes created first, and wish to map those into database tables. There are ways to implement in the opposite direction, meaning you have your database and wish to create corresponding classes ("Model first"). I'll use a simple structure of a Person class and Company class.
The simpler of the two is the company class, which consists of 2 properties: an ID and a name.

public class Company
{
    public Company()
    {
 
    }
 
    public Company(Guid companyId, string companyName)
    {
        this.CompanyId = companyId;
        this.CompanyName = companyName;
    }
 
    [KeyColumn(Order =1)]
    public Guid CompanyId { getset; }
 
    [KeyColumn(Order = 2)]
    public string CompanyName { getset; }
}

A few points to note, though:

  • Notice it has an empty default constructor with no arguments. Even if this constructor does nothing, it is required for reconstructing the object once it's fetched back from the database.
  • For this example, I've defined  both public properties, CompanyId and CompanyName as parts of a compound primary key.  It is also necessary to order the key parts as demonstrated here.

For this demo, I've also included a simple enum. Enums were quite clumsy to use in previous CTP versions of the Entity Framework, but as of version 4.x they are supported more easily.
Hence the following enum is also defined:

public enum Prefix 
{ 
    Mr,
    Ms,
    Mrs,
    Dr
}


The Person class:

public class Person
{
    public Person()
    {
 
    }
 
    public Person(Guid personId, string name, int age, Prefix pref, Company workplace)
    {
        this.PersonId = personId;
        this.Name = name;
        this.Age = age;
        this.NamePrefix = pref;
        this.Workplace = workplace;
    }
 
    [Key]
    public Guid PersonId { getset; }
 
    public string Name { getset; }
 
    public int Age { getset; }
 
    public Company Workplace { getset; }
 
    [Required]
    public virtual Prefix NamePrefix { getset; }
 
    public virtual int NamePrefixId
    {
        get { return (int)NamePrefix; }
        set { NamePrefix = (Prefix)value; }
    }
}

 

  • A more complex class. It has a member of type Company.
  • It has 2 member properties: NamePrefix and NamePrefixId, which relate to the enum of type Prefix. The NamePrefixId member is a helper for translating the enum to/from int, which is the actual underlying type which will be stored in the database.
  • It also has an empty default non-argumentative constructor for the sake of reconstructing the retrieved object.

Database context
This class is required as a management context for our persisted objects against the framework. It inherits DbContext and its properties, which are of the generic DbSet type represent the queryable collections of the persisted objects.

public class PersonsContext : DbContext
{
    public PersonsContext()
        : base(PersonsContext.ConnectionString)
    {
    }
 
    public DbSet<Person> Persons { getset; }
    public DbSet<Company> Companies { getset; }
 
    public static string ConnectionString
    {
        get
        {
            return @"Data Source=" + 
                System.Reflection
                    .Assembly
                    .GetExecutingAssembly()
                    .Location
                    .Substring(0, 
                        System
                        .Reflection
                        .Assembly
                        .GetExecutingAssembly()
                        .Location
                        .LastIndexOf("\\") + 1) 
                + @"\\people.sdf";
        }
    }
}

Furthermore:

  • Notice the constructor.
    It invokes the base class constructor, providing a simple connection string to our database.
    It could have also provided the name of a connection string from the App.Config file, or it could provide no connection string at all (in which case our database would be created on the local instance of SQL Express, with a name similar to our executing application.
  • The connection string provided here corresponds with MS SQL Compact, and refers to a database file, people.sdf, which is expected to be created/found on the same folder of our application's assembly (If debug/run the solution from Visual Studio, the folder would be Bin\Debug by default)

Showing the seeds
Many times when we run a newly built database-oriented application, we'd want to start with some predefined data already stored in the database. If we generate the database manually with some SQL script, we could easily include some INSERT statements in order to generate and store the initial data. In the case of Entity Framework, we can generate and store our initial data by creating the following class:

public class DatabaseInitializer : CreateDatabaseIfNotExists<PersonsContext>
{
    protected override void Seed(PersonsContext context)
    {
        Company telerik = new Company(Guid.NewGuid(), "Telerik");;
        Person alon = new Person(Guid.NewGuid(), "Alon", 38, Prefix.Mr, telerik);
 
        context.Companies.Add(telerik);
        context.Persons.Add(alon);
 
        context.SaveChanges();
    }
}

Notice:

  • This class inherits the generic CreateDatabaseIfNotExists class. This is the default policy of the Entity Framework (to create the database if it does not already exist). Other options are listed on the MSDN library.
  • We override the Seed method, and populate the context argument with our predefined objects. Once the new database is created, this data should be automatically inserted into the underlying tables. In this case, one company (telerik) and one person (alon) are created and seeded.

Helper classes

Now almost everything is in its right place. We will need to tie everything together, though. I love helper classes. They are just so damn helpful. I've created this helper class in order to simplify and wrap the interaction with the data context nicely.

public class DataManager
{
    public static PersonsContext DataContext
    {
        get
        {
            if (DataManager.dataContext == null)
            {
                Database.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0");
                DataManager.dataContext = new PersonsContext();
                bool dbExists = DataManager.dataContext.Database.Exists();
                if (dbExists)
                {
                    //UpgradeScript();
                }
                if (!dbExists)
                {
                    Database.SetInitializer(new DatabaseInitializer());
                }
                else
                    Database.SetInitializer<PersonsContext>(null);
            }
            return DataManager.dataContext;
        }
    }
    private static PersonsContext dataContext = null;
}

About this class:

  • The main purpose here is to statically cache (in memory) and manage our PersonsContext object. A few important settings are also applied here:Setting the default database factory to SQL Server Compact (SqlServerCe).
  • If the database does not exist, an initializer of type DatabaseInitializer is assigned. That is, the seeding class defined above will kick in and create the persisted entities in the database.
  • If the database already exists, no initializer is assigned, but I'm leaving the option to run upgrade scripts (i.e. check the version of our data and apply changes in the database schema according to changes in our persisted classes and/or seeded data to match the current product version) if they are needed.
    Those should manipulate tables, and need to be run directly against the database.

Manipulations
To demonstrate the ease of use of this shameless production and manipulation through basic CRUD operations, I've constructed a small console application. Here is its main function:

class Program
{
    static void Main(string[] args)
    {
        //Check seeding:
        Console.WriteLine("{0} persons are in your database.\n"DataManager.DataContext.Persons.Count());
 
        //Basic CRUD operations:
 
        //C(reate)
        if (DataManager.DataContext.Companies.FirstOrDefault(
        c => c.CompanyName == "Microsoft") == null)
        {
            DataModel.Company microsoft = new DataModel.Company(Guid.NewGuid(), "Microsoft");
            DataManager.DataContext.Companies.Add(microsoft);
            DataManager.DataContext.Persons.Add(new DataModel.Person(
                Guid.NewGuid(), 
                "John doe", 
                20, 
                DataModel.Prefix.Dr, 
                microsoft));
            DataManager.DataContext.Persons.Add(new DataModel.Person(
                Guid.NewGuid(), 
                "Klark Kent", 
                30, 
                DataModel.Prefix.Dr, 
                microsoft));
            DataManager.DataContext.SaveChanges();
        }
 
        //R(ead)
        IQueryable<DataModel.Person> microsoftWorkers = DataManager.DataContext.Persons.Where(
            person => person.Workplace.CompanyName == "Microsoft");
        Console.WriteLine("{0} persons are working in Microsoft.\n", microsoftWorkers.Count());
 
        //U(pdate)
        DataModel.Person johnDoe = DataManager.DataContext.Persons.FirstOrDefault(
            p => p.Name == "John Doe");
        if (johnDoe != null)
        {
            johnDoe.Name = "Changed Name";
            DataManager.DataContext.SaveChanges();
        }
 
        //D(elete)
        DataModel.Person klark = DataManager.DataContext.Persons.FirstOrDefault(
            p => p.Name == "Klark Kent");
        if (klark != null)
        {
            DataManager.DataContext.Persons.Remove(klark);
            DataManager.DataContext.SaveChanges();
        }
            
        //Done.
        Console.ReadKey();
    }
}

 

Where is my data?
As written in the prerequisites section above, I'm using the very comfortable SQL Server Compact Toolbox Visual Studio extension.
Once installed, it can be accessed through the Tools menu:

Connecting to your database file is then extremely simple:

In the dialog, browse to select your created SDF database file, the connection string will be automatically created:

And you can now browse through your database and run queries like any civilized respectful person would do, if they were you:

A query execution window will open



Web Deploy Hosting :: ASPHostPortal.com - How to Fix “Error: An unsupported response was received. The response header ‘MSDeploy.Response’ was ” but ‘v1' was expected

clock September 23, 2013 07:32 by author Ben

When you get this error from MSDeploy: 

“Error: An unsupported response was received. The response header ‘MSDeploy.Response’ was ” but ‘v1′ was expected.

Error: The remote server returned an error: (401) Unauthorized.”

This means that you do not have access. On our newer servers web deploy is enabled from the Management tab in your website. Older servers require web deploy to be enabled for each account, so please submit a support ticket if you need it enabled.

So you can follow this step fo fix error :

1. Web Deploy package is not installed on the IIS server in question . To install find the " Web Deploy " or " Web Deploy 2.0 " from the top level IIS.Net \ Download ( for downloading all extensions ) or directly on the Web Deploy 2.0 page . Alternately if the Platform installer addin is installed one can find it through the IIS Server Manager where one can also install it and other goodies . ( The platform installer as shown below can be found in the server list and individual website or list of icons in the management section . )



2. Even if Web Deploy package is installed , the service is not running automatically . Follow these steps to find the correct service and get it running .

a. Run services.msc from the start bar or command line .

 

b. Search for the service named Web Deployment Agent Service . Once found verify it is running and also starts up automatically after a reboot .



3. Also your account may not have permissions to publish to the web site in question . In IIS Management Studio , find the website in question and the make sure your ( or other 's ) credentials are found in the IIS Manager Permission list .





ASP.NET Hosting - IIS 7.5 Hosting - ASPHostPortal.com :: Configure Costum Error in IIS 7.5 With ASP.NET

clock September 21, 2013 09:17 by author Ben

Now, I will explain how to configure custom error pages in IIS (Internet Information Service). For this example we will be using IIS 7.5 which shipped with Windows Server 2008 R2.

First Step, Open Internet Information Services (IIS) Manager.  Select your website. Note: This could also be set at the server level and applied to all sites on the server. DoubleClick on the “.NET Error Pages” icon.


The .NET Error Pages features view will be displayed.


Click the “Edit Feature Settings” link to enable this feature. The “Edit Error Page Settings” dialog box will appear.


How to determine the error code 404 explicitly..

First, On the .NET Error Pages Actions menu click the Add link.


The “Add Custom Error Page” dialog will appear. This is where we define individual error pages per status code. For our example we will add a custom page for the HTTP 404 Error.




Now that we have turned on the feature and added a custom page for the 404 status code we can verify it is working. Please reload your website.

As mentioned above this can also be managed from the site’s web.config file. Consider the following configuration section from our site’s web.config file.



ASP.NET Hosting - ASPHostPortal :: How to Resolve "~/Telerik.Web.UI.WebResource.axd' is missing in web.config"

clock September 13, 2013 08:23 by author Mike

Problem 1:
When attempting to run an application that uses certain Telerik controls, you may run into the error below:

System.InvalidOperationException:
‘~/Telerik.Web.UI.WebResource.axd’ is missing in web.config.
RadStyleSheetManager requires a HttpHandler registration in web.config. Please,
use the control Smart Tag to add the handler automatically, or see the help for
more information: Controls > RadStyleSheetManager at
Telerik.Web.UI.RadStyleSheetManager.OnPreRender(EventArgs e) at
System.Web.UI.Control.PreRenderRecursiveInternal() at
System.Web.UI.Control.PreRenderRecursiveInternal() at
System.Web.UI.Control.PreRenderRecursiveInternal() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)


Solution:
I’ve seen that error on new DotNetNuke installations but it certainly isn’t specific to DNN, nor is it a problem with the Telerik controls. The issue is that the Integrated Pipeline Mode and Classic Modes handle the registration slightly differently within the web.config file.
To resolve this error you can make changes to your web.config file, or, a perhaps faster and easier solution, is to change your site’s ASP.NET version to Classic Mode – both seem to work equally well.

Problem 2:
When you place RadScriptManager on aspx page and compile it gives error like, 

" '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. 
Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager "


Solution:
Its Simple And fast you Just Have to register The radScriptmanager and it will modify the web config file automatically.

  • Click RadScriptManager Menu Cursor .It Will Display RadScript Manager Tasks click on Regiter Telerik.Web>UI.WebResource.axd
Telerik.Web.UI.WebResource.axd
  • Telerik.WebUI.WebResources.axd Is Now Succeessfully Register in Web Config.

    Telerik.Web.UI.WebResource.axd



ASP.NET 4.0 Hosting :: Multiselect Dropdown for Web Applications ASP.NET 4.0

clock September 4, 2013 11:18 by author Mike

In this article, I will show you how to create a multiselect in an ASP.NET 4.0 page. I will keep this article short and sweet so you can just use the code in your applications. Lets see how I implement this.

Now, place one textbox in your design view and assign the popup extender for that textbox. Important note here is you must be place your textbox control within the "Updatepanel". Afterwards, you create one panel and within this panel you put one checkboxlist. You assign this panel to the "PopupControlID" property of the Popup Extender.

Now see this code:

Finally we must do only one modification in code behind, because each time clicking the checkboxlist that selected value will added into the textbox control. So in selected index changed event you will place this code.


Finish. Hopefully this article can help you.



Windows 2012 Hosting :: Introduction Dynamic Access Control 2012

clock September 2, 2013 12:09 by author Ben

Do you know what is Dynamic Access Control??
Microsoft Dynamic Access Control (DAC) is a data governance tool in Windows Server 2012 that lets administrators control access settings. DAC uses centralized policies to let administrators review who has access to individual files. Files can be manually or automatically classified.

Windows Server 2012 Dynamic Access Control basically organize information automatically on file servers in order to meet business needs and regulatory requirements .

With the use of technology in the DAC classification , organization or company can identify or provide " tags " or labels to files on the file server . This capability to control access to files that were tagged through centralized access policies , perform audits and related reporting events related to access or attempts to access , use RMS ( Rights Management Services ) to encrypt Office documents so that the documents safe when the data out of the file server .

A number of the features found in Windows Server 2012 that are beneficial to the administrator in this regard :

  •     File owner , or the owner can directly provide information " tags " or labels to their own information , so do not need to be done by the administrator .
  •     Apply to the central access policy files ( information ) that has been in the " tag " or label given
  •     Provide " access denied remediation " when the user can not access the information .
  •     Configure the central audit trail records policies for information access ( access logs ) that can later be used for analysis and forensic needs .
  •     Protect certain sensitive information to the protection of the RMS automatically.


Label or tag used to identify the protected file can be used to classify files in logic . In Windows Server 2012 , this label can be applied in four ways :

  •     Based on location . When files are stored on a file server , the file inherits the label of its parent folder .
  •     Manually . Users and administrators can manually file labeling .
  •     Automatic . Files can be automatically labeled based on content or other characteristics .
  •     With the application , using the API for labeling file maintained by the application .

 



Windows 2012 Hosting :: Hyper-v 3.0 Network Virtualization on Windows 2012

clock August 28, 2013 10:21 by author Mike

Windows Server introduces a slew of new technologies. These technologies enable Windows Server systems and virtual environments to meet all manner of new requirements and scenarios, including private and public cloud implementations. Often, this type of scenario involves a single infrastructure that's shared by different business units or even different organizations. 

In this article, I want to describe Network virtualization. Other great capabilities include a new site-to-site VPN solution; huge enhancements to the Server Message Block (SMB) protocol, enabling VMs to run from a Server 8 file share; native NIC teaming; and consistent device naming. But I want to focus on the major network technologies that most affect virtualization.

Virtualization has always striven to abstract one resource layer from another, giving improved functionality and portability. But networking hasn't embraced this goal, and VMs are tied to the networking configuration on the host that runs them. Microsoft System Center Virtual Machine Manager (VMM) 2012 tries to link VMs to physical networks through its logical networks feature, which lets you create logical networks such as Development, Production, and Backup. You can then create IP subnets and virtual LANs (VLANs) for each physical location that has a connection to a logical network. This capability lets you create VMs that automatically connect to the Production network, for example; VMM works out the actual Hyper-V switch that should be used and the IP scheme and VLAN tag, based on the actual location to which the VM is deployed.

This feature is great. But it still doesn't help in scenarios in which I might be hosting multiple tenants that require their own IP schemes, or even one tenant that requires VMs to move between different locations or between private and public clouds, without changing IP addresses or policies that relate to the network. Typically, public cloud providers require clients to use the hosted IP scheme, which is an issue for flexible migration between on-premises and off-premises hosting.

Both these scenarios require the network to be virtualized, and the virtual network must believe that it wholly owns the network fabric, in the same way that a VM believes it owns the hardware on which it runs. VMs don't see other VMs, and virtual networks shouldn't see or care about other virtual networks on the same physical fabric, even when they have overlapping IP schemes. Network isolation is a crucial part of network virtualization, especially when you consider hosted scenarios. If I'm hosting Pepsi and Coca-Cola on the same physical infrastructure, I need to be very sure that they can't see each other's virtual networks. They need complete network isolation.

This virtual network capability is enabled through the use of two IP addresses for each VM and a virtual subnet identifier that indicates the virtual network to which a particular VM belongs. The first IP address is the standard address that's configured within the VM and is referred to as the customer address (using IEEE terms). The second IP address is the address that the VM communicates over the physical network and is known as the provider address.

In the example that Figure 1 shows, we have one physical fabric. Running on that fabric are two separate organizations: red and blue. Each organization has its own IP scheme, which can overlap, and the virtual networks can span multiple physical locations. Each VM that is part of the virtual red or blue network has its own customer address. A separate provider address is used to send the actual IP traffic over the physical fabric.

Figure 1: Virtual networking example


Figure 1: Virtual networking example 

You can see that the physical fabric has the network and compute resources and that multiple VMs run across the hosts and sites. The color of the VM coordinates with its virtual network (red or blue). Even though the VMs are distributed across hosts and locations, the hosts in the virtual networks are completely isolated from the other virtual networks with their own IP schemes.

Two solutions-IP rewrite and Generic Routing Encapsulation (GRE)-enable network virtualization in Server 8. Both solutions allow completely separate virtual networks with their own IP schemes (which can overlap) to run over one shared fabric.

IP rewrite. The first option is IP rewrite, which does exactly what the name suggests. Each VM has two IP addresses: a customer address, which is configured within the VM, and a provider address, which is used for the actual packet transmission over the network. The Hyper-V switch looks at the traffic that the VM is sending out, looks at the virtual subnet ID to identify the correct virtual network, and rewrites the IP address source and target from the customer addresses to the corresponding provider addresses. This approach requires many IP addresses from the provider address pool because every VM needs its own provider address. The good news is that because the IP packet isn't being modified (apart from the address), hardware offloads such as virtual machine queue (VMQ), checksum, and receive-side scaling (RSS) continue to function. IP rewrite adds very little overhead to the network process and gives very high performance.

Figure 2 shows the IP rewrite process, along with the mapping table that the Hyper-V host maintains. The Hyper-V host maintains the mapping of customer-to-provider addresses, each of which is unique for each VM. The source and destination IP addresses of the original packet are changed as the packet is sent via the Hyper-V switch. The arrows in the figure show the flow of IP traffic.

Figure 2: IP rewrite process


Figure 2: IP rewrite process 

GRE. The second option is GRE, an Internet Engineering Task Force (IETF) standard. GRE wraps the originating packet, which uses the customer addresses, inside a packet that can be routed on the physical network by using the provider address and that includes the actual virtual subnet ID. Because the virtual subnet ID is included in the wrapper packet, VMs don't require their own provider addresses. The receiving host can identify the targeted VM based on the target customer address within the original packet and the virtual subnet ID in the wrapper packet. All the Hyper-V host on the originating VM needs to know is which Hyper-V host is running the target VM and can send the packet over the network.

The use of a shared provider address means that far fewer IP addresses from the provider IP pools are needed. This is good news for IP management and the network infrastructure. However, there is a downside, at least as of this writing. Because the original packet is wrapped inside the GRE packet, any kind of NIC offloading will break. The offloads won't understand the new packet format. The good news is that many major hardware manufacturers are in the process of adding support for GRE to all their network equipment, enabling offloading even when GRE is used.

Figure 3 shows the GRE process. The Hyper-V host still maintains the mapping of customer-to-provider address, but this time the provider address is per Hyper-V host virtual switch. The original packet is unchanged. Rather, the packet is wrapped in the GRE packet as it passes through the Hyper-V switch, which includes the correct source and destination provider addresses in addition to the virtual subnet ID.


Figure 3: GRE 

In both technologies, virtualization policies are used between all the Hyper-V hosts that participate in a specific virtual network. These policies enable the routing of the customer address across the physical fabric and track the customer-to-provider address mapping. The virtualization policies can also define the virtual networks that are allowed to communicate with other virtual networks. The virtualization policies can be configured by using Windows PowerShell, which is a common direction for Server 8. This makes sense: When you consider massive scale and automation, the current GUI really isn't sufficient. The challenge when using native PowerShell commands is the synchronous orchestration of the virtual-network configuration across all participating Hyper-V hosts.

Both options sound great, but which one should you use? GRE should be the network virtualization technology of choice because it's faster than IP rewrite. The network hardware supports GRE, which is important because otherwise GRE would break offloading, and software would need to perform offloading, which would be very slow. Also, because of the reduced provider address requirements, GRE places fewer burdens on the network infrastructure. However, until the networking equipment supports GRE, you should use IP rewrite, which requires no changes on the network infrastructure equipment.

 



ASP.NET MVC 4 Hosting - ASPHostPortal :: Build Mobile Applications With ASP.NET MVC 4.5

clock August 20, 2013 05:56 by author Ben

The MVC 4 release is building on a pretty mature base and is able to focus on some more advanced scenarios. Some top features include:

  • ASP.NET Web API
  • Enhancements to default project templates
  • Mobile project template using jQuery Mobile
  • Display Modes
  • Task support for Asynchronous Controllers
  • Bundling and minification

The following sections provide an overview of these features. We’ll be going into them in more detail throughout the book.
Developing MVC 4 applications with Visual Studio 2011 Developers Preview is quite jump-start for developers as it has inbuilt support for JQuery Mobile css & javascripts, nice intellisense for HTML 5 , CSS 3 media queries. MVC 4 developers preview was built keeping in mind the Mobile Web Developers who wants keen support of rich MVC in Mobile Web.

  • Lets start to develop MVC 4 mobile application with JQuery Mobile, HTML5, CSS3 in VS 2011 developers preview.

  • Select your MVC 4 application domain either Internet/Intranet/Mobile Web application  with default Razor or ASPX syntaxes. For my demo , selected Mobile Web application in VS 2011 Developer Preview.

  • Next, write some JQuery Mobile application code to check th UI view in SmartPhones while Model & Controller logic remains same & could change according to business requirements.
  • Database -> Entity Framework (EF) -> Model in MVC 4(Entities) (DAL)-> Controllers (Business Logic Layer)(BLL) -> View(s) -> Master(_Layout.cshtml) is the default development path in MVC 4 Web & mobile application.

  • Next , Check the nice intellisense support for HTML5 , JQuery Mobile in Visual Studio 2011 Developer Preview.

  • Check out the MVC 4 Mobile Web applications with JQuery Mobile , HTML5 , CSS 3 media queries in Smart Devices.
  • JQuery Mobile View in iPhone of MVC 4 Mobile application:

 



Windows 2012 Hosting - ASPHostPortal :: Things to Know About Deduplication in Windows Server 2012

clock August 15, 2013 08:14 by author Jervis

Talk to most administrators about deduplication and the usual response is: Why? Disk space is getting cheaper all the time, with I/O speeds ramping up along with it. The discussion often ends there with a shrug.

But the problem isn’t how much you’re storing or how fast you can get to it. The problem is whether the improvements in storage per gigabyte or I/O throughputs are being outpaced by the amount of data being stored in your organization. The more we can store, the more we do store. And while deduplication is not a magic bullet, it is one of many strategies that can be used to cut into data storage demands.

Microsoft added a deduplication subsystem feature in Windows Server 2012, which provides a way to perform deduplication on all volumes managed by a given instance of Windows Server. Instead of relegating deduplication duty to a piece of hardware or a software layer, it’s done in the OS on both a block and file level — meaning that many kinds of data (such as multiple instances of a virtual machine) can be successfully deduplicated with minimal overhead.

If you plan to implement Windows Server 2012 deduplication technology, be sure you understand these seven points:

1. Deduplication is not enabled by default

Don’t upgrade to Windows Server 2012 and expect to see space savings automatically appear. Deduplication is treated as a file-and-storage service feature, rather than a core OS component. To that end, you must enable it and manually configure it in Server Roles | File And Storage Services | File and iSCSI Services. Once enabled, it also needs to be configured on a volume-by-volume basis.

2. Deduplication won’t burden the system

Microsoft put a fair amount of thought into setting up deduplication so it has a small system footprint and can run even on servers that have a heavy load. Here are three reasons why:

a. Content is only deduplicated after n number of days, with n being 5 by default, but this is user-configurable. This time delay keeps the deduplicator from trying to process content that is currently and aggressively being used or from processing files as they’re being written to disk (which would constitute a major performance hit).

b. Deduplication can be constrained by directory or file type. If you want to exclude certain kinds of files or folders from deduplication, you can specify those as well.

c. The deduplication process is self-throttling and can be run at varying priority levels. You can set the actual deduplication process to run at low priority and it will pause itself if the system is under heavy load. You can also set a window of time for the deduplicator to run at full speed, during off-hours, for example.

This way, with a little admin oversight, deduplication can be put into place on even a busy server and not impact its performance.

3. Deduplicated volumes are ‘atomic units’

‘Atomic units’ mean that all of the deduplication information about a given volume is kept on that volume, so it can be moved without injury to another system that supports deduplication. If you move it to a system that doesn’t have deduplication, you’ll only be able to see the nondeduplicated files. The best rule is not to move a deduplicated volume unless it’s to another Windows Server 2012 machine.

4. Deduplication works with BranchCache

If you have a branch server also running deduplication, it shares data about deduped files with the central server and thus cuts down on the amount of data needed to be sent between the two.

5. Backing up deduplicated volumes can be tricky

A block-based backup solution — e.g., a disk-image backup method — should work as-is and will preserve all deduplication data.

File-based backups will also work, but they won’t preserve deduplication data unless they’re dedupe-aware. They’ll back up everything in its original, discrete, undeduplicated form. What’s more, this means backup media should be large enough to hold the undeduplicated data as well.

The native Windows Server Backup solution is dedupe-aware, although any third-party backup products for Windows Server 2012 should be checked to see if deduplication awareness is either present or being added in a future revision.

6. More is better when it comes to cores and memory

Microsoft recommends devoting at least one CPU core and 350 MB of free memory to process one volume at a time, with around 100 GB of storage processed in an hour (without interruptions) or around 2 TB a day. The more parallelism you have to spare, the more volumes you can simultaneously process.

7. Deduplication mileage may vary

Microsoft has crunched its own numbers and found that the nature of the deployment affected the amount of space savings. Multiple OS instances on virtual hard disks (VHDs) exhibited a great deal of savings because of the amount of redundant material between them; user folders, less so.

In its rundown of what are good and bad candidates for deduping, Microsoft notes that live Exchange Server databases are actually poor candidates. This sounds counterintuitive; you’d think an Exchange mailbox database might have a lot of redundant data in it. But the constantly changing nature of data (messages being moved, deleted, created, etc.) offsets the gains in throughput and storage savings made by deduplication. However, an Exchange Server backup volume is a better candidate since it changes less often and can be deduplicated without visibly slowing things down.

How much you actually get from deduplication in your particular setting is the real test for whether to use it. Therefore, it’s best to start provisionally, perhaps on a staging server where you can set the “crawl rate” for deduplication as high as needed, see how much space savings you get with your data and then establish a schedule for performing deduplication on your own live servers.

 



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

 photo ahp banner aspnet-01_zps87l92lcl.png

Author Link

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in