Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

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

ASP.NET MVC 3 Hosting - ASPHostPortal :: Using ViewModels to Manage Data & Organize Code in ASP.NET MVC Applications

clock December 6, 2011 06:45 by author Jervis

The concept of the ViewModel isn't just for ASP.NET MVC, as you'll see references to ViewModels throughout the web in articles and blog posts about the MVC, MVP, and MVVM patterns. Those posts and articles can center around any number of technologies such as ASP.NET, Silverlight, WPF, or MVC... This post will investigate ViewModels as they apply to the world of ASP.NET MVC.

What is an ASP.NET MVC ViewModel?

In ASP.NET MVC, ViewModels allow you to shape multiple entities from one or more data models or sources into a single object, optimized for consumption and rendering by the view. The below image illustrates the concept of a ViewModel:



The purpose of a ViewModel is for the view to have a single object to render, alleviating the need for UI logic code in the view that would otherwise be necessary. This means the only responsibility, or concern, of the view is to render that single ViewModel object, aiding in a cleaner separation of concerns (SoC). Concerns are distinct aspects of the application that have a particular purpose (i.e., concern), and keeping these aspects apart means your application is more organized, and the code more focused. Putting data manipulation code in its own location away from the view and controller, enforces SoC.

Using ViewModels in MVC for finer granularity and better SoC leads to more easily maintainable and testable code. Remember, unit testing is about testing small units.

Along with better coding practices, there are many business reasons demonstrating why you might consider using ViewModels:

·         Incorporating dropdown lists of lookup data into a related entity

·         Master-detail records view

·         Pagination: combining actual data and paging information

·         Components like a shopping cart or user profile widget

·         Dashboards, with multiple sources of disparate data

·         Reports, often with aggregate data

The above scenarios are common to a wide variety of applications, and deal with more complex data than basic CRUD forms-over-data page (e.g., a simple 1:1 mapping to the db table). For example, providing a list of states, and ensuring that the state that matches the state of current customer, means that you need to either provide two sets of data or a single set of customer/state data combined, as shown in the image below.



Some scenarios such as a lookup table representing states in the USA, could easily work with either ViewModels or a ViewBag/ViewData object, so there is some potential overlap at times. It's up to the application architects and developers to decide what works best with their exact use case.

Creating a ViewModel

Although a ViewModel consists of multiple entities, at its core a ViewModel is still just a class - and one that doesn't even inherit from anything special, as many MVC classes do. 


Physically, ViewModels can exist in different locations, listed below:

·         In a folder called ViewModels that resides in the root of the project. (small apps)

·         As a .dll referenced from the MVC project (any size app)

·         In a separate project(s) as a service layer, for large applications that generate view/content specific data. (enterprise apps)

Since a ViewModel is just a class, the easiest way to get started using one is to create a new folder named ViewModels and add a new code file to it.

To create the CustomerViewModel ViewModel, add the Customer and StatesDictionary types as properties to form one CustomerViewModel class. In the example below, the CustomerViewModel class contains the newly defined properties.

public class CustomerViewModel
{
    public Customer Customer { get; set; }
    public StatesDictionary States { get; set; }
    public CustomerViewModel(Customer customer)
    {
        Customer = customer;
        States = new StatesDictionary();
    }
}

Generally, ViewModels contain the word "ViewModel" as part of its name; however, the conventions at work here are for consistency in code readability, since other classes in MVC state their intents in their names as well (e.g., names of controllers, action methods, etc...use conventions in their names).

The StatesDictionary class is a simple Dictionary object containing two type parameters of type string. The class also contains the definitions for all the members in the Dictionary (i.e., the state data). The only property in the StatesDictionary class is the StateSelectList, which is an object that Html Helpers use with to render an HTML <select> element that displays a listing of states. The type Dictionary<string, string> in the StateSelectList property maps to the state abbreviation then state name, respectively.

public class StatesDictionary
{
    public static SelectList StateSelectList
    {
        get { return new SelectList(StateDictionary, "Value", "Key"); }
    }
    public static readonly IDictionary<string, string>
        StateDictionary = new Dictionary<string, string> {
      {"Choose...",""}
    , { "Alabama", "AL" }
    , { "Alaska", "AK" }
    , { "Arizona", "AZ" }
    , { "Arkansas", "AR" }
    , { "California", "CA" }
    // code continues to add states...
    };
}

Data that lives in small lists and infrequently changes, like the StatesDictionary class, exists in all types of applications. In real world applications, you'll find a variety of methods for dealing with lookup data such as a list of states - often XML files and SQL tables. You can replace the code in the StateDictionary method to use entities from Entity Framework, read data from files, or any data access code that you require.

After creating the ViewModel, the next steps are to instantiate it in a controller and return it to the view.

Getting the ViewModel to the view

Starts with the controller...

Sending a ViewModel to the view for rendering will work the same as when dealing with a model. Since it's just a class, the view doesn't know, and doesn't care, where the model or ViewModel came from. You can create the instance of the ViewModel class in the controller, or resolve it if using an IoC container. Remember that just as you would do with views, you should keep controllers clean of unnecessary code, meaning that only code that fetches the model or ViewModel belongs here, and little more.


public ActionResult Edit(int id)
{
    Customer customer = context.Customers.Single(x => x.Id == id);
    var customerViewModel = new CustomerViewModel(customer);
    return View(customerViewModel);
}

Then the view renders the ViewModel...

In order for the view to know what object to use, set the @model keyword to point to the ViewModel, just like you already would with a regular model.

@model FourthCoffee.Web.ViewModels.CustomerViewModel

Because the Customer object is a property of the ViewModel, you'll see the model.Class.Property syntax to access the ViewModel data, similar to the following line of code.

<div class="editor-label">

    @Html.LabelFor(model => model.Customer.FirstName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Customer.FirstName)
    @Html.ValidationMessageFor(model => model.Customer.FirstName)
</div>
@* ...View code continues rendering properties... *@

Additionally, you can edit the Edit/Create views so that the DropDownList containing a list of the states will display, and display the correct state matching that of the customer.

<div class="editor-field">   
    @Html.DropDownList("state", new SelectList(StatesDictionary.StateSelectList,

                       "Value", "Text", Model.Customer == null ? "" : Model.Customer.State))
    @Html.ValidationMessageFor(model => model.Customer.State)
</div>

As you might have noticed, using a ViewModel is just as easy as using the ViewBag or ViewData objects. ViewModels, however, provide those extra benefits like being easier to test and optimize.

Checking the results

After a user navigates to the /Customers/Edit/1 URL in the browser, the Razor view engine renders the CustomerViewModel similarly to the following screen shot.



The State DropDownList displays the states and the current state for that customer, as expected.

Digging Further into ViewModels

Because ViewModels render pre-manipulated data that no longer have those 1:1 mappings between model classes and database tables, you'll need to do create mappings yourself. You can manually map small ViewModels, but this will quickly become burdensome when mapping larger classes, especially when working with parent-child-grandchild, multi-level, or complex data. This is where a tool such as
AutoMapper comes into play. AutoMapper will let you fluently setup mappings between ViewModels and models more easily than doing so manually, or writing your own mapper.

Here are some tips for using ViewModels:

·         Put only data that you'll render in the ViewModel.

·         The view should direct the properties of the ViewModel, this way it fits better for rendering and maintenance.

·         Use a mapper when ViewModels become complex.

Some tools that can help assist you in generating POCOs (Plain Old CLR Objects) for models and ViewModels are:

POCO Generator

EF POCO Templates

You should always prefer using a ViewModel rather than instantiating multiple models and putting that manipulation code in the controller.

Summary

ViewModels help you organize and manage data in MVC applications when you need to work with more complex data than the other objects allow. Using ViewModels gives you the flexibility to use data as you see fit. ViewModels area generally a more flexible way to access multiple data sources than models + ViewBag/ViewData objects.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

-
DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



Windows 2008 Hosting - ASPHostPortal :: How to Add Connection String in Your Web.Config

clock December 2, 2011 06:02 by author Jervis

Hello, howdy? Today, I will show you simple tutorial how to add a connection string in your web.config.

<connectionStrings>
               <add name="ConnectionString" connectionString="Data Source=DatabaseServer;Initial Catalog=DatabaseName;User ID=DBUser;Password=DBUserPassword" providerName="System.Data.SqlClient"/>
    </connectionStrings>


The name in the connection string are self explanatory.

Now to call your connection string in your code you would have to write the below code :

public string SqlConnection
       {
           get
           {
               if (sqlconnection == null)
               {
                   sqlconnection = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
               }
               return sqlconnection;
           }
       }


Now, you have known how to add connection string in your web.config.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

-
DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



Windows 2008 Hosting - ASPHostPortal :: How to Fix - Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path

clock November 24, 2011 06:53 by author Jervis

When you are trying to connect to a "user instance" of SQL Server from your Web application running on Windows 7 or Windows 2008 R2 and you’re getting a message that looks like this:



I will try to help you here.

Note: this error only happens if you have User Instance=true in your connection string. The IIS team made a change to the default identity of the worker process.   Starting with IIS 7.5, Application Pools run with a unique identity based on the Application Pool name, rather than NetworkService – the default identity for IIS6 and IIS7.  The primary reason for this change is to increase the security of IIS and Application Pools by default, providing a much better sandbox between Applications and other Windows services by default. 

Unfortunately, the new identity does not have a user profile, and as you can see from the error, this causes the SqlClient data stack to fail.  There are a few things you can do to "fix" this error: 

1) switch back to NetworkService
2) switch to a user account that has a local profile (like a real user / domain user account).  To do that, fire open IIS Manager and browse to Application Pools node for your computer.  Click on the AppPool for the application you are trying to run and select the “Advanced Settings” task (in yellow on right).  Select identity and choose NetworkService as a built-in account, or select “Custom account” and type in the user/password. 



If you’re a command-line person, you can do it this way (all on one line):

%windir%\system32\inetsrv\appcmd.exe set config 
-section:system.applicationHost/applicationPools /[name='YOUR_APPPPOOL_NAME_HERE'].processModel.identityType:"NetworkService" 
/commit:apphost



WebMatrix Hosting - ASPHostPortal :: WebMatrix and jQuery Mobile

clock November 18, 2011 07:22 by author Jervis

Recently I have seen a number of examples using ASP.NET MVC with jQuery Mobile for displaying a list of blog posts to mobile devices. I thought I would show you similar code for doing this with the ASP.NET Web Pages Framework and Razor View Engine via WebMatrix. I want to warn you up front that the solution will seem too easy. One page, and only 1 page of code and markup is all that we will need to write to create the solution ( besides our sample database, of course ).

First things first, we need a database. Let's create a simple SQL Server CE 4 database right within WebMatrix itself. The database tooling feels a lot like SQL Server Management Studio, which is fantastic for new developers as they can take these skills with them for managing other versions of SQL Server. Here is a quick snapshot of the database definition:



Once we have the database defined and add a bit of data that I pulled from my blog, I can go ahead and create a blank Razor Page with all the necessary stylesheets, JavaScript files, HTML markup, and Razor code. You can click on the image to see a more viewable version of the page, but even now it looks way too easy.



 In the example, we connect to the database, define a query, and then execute the query and return the results. In this case the results are posts from the database. Further down the page we iterate through each post, displaying the date the post was published as well as a clickable title that takes you to the post.

The bonus here is that if the needs of your application grow, you can easily convert this to ASP.NET MVC 3. The top-most code gets swallowed up into a controller or service per your strategy for separating the concerns, leaving the HTML and Razor markup the same in the rest of the page.

Now here is the best part - click Run :)



You have a quick list of posts that give you a wonderful user experience on your mobile phone or tablet.



Visual Studio 2010 Hosting - ASPHostPortal :: How to Define data in LightSwitch Application

clock November 17, 2011 07:46 by author Jervis

VisualStudio LightSwitch is a new development tool designed especially for rapid application development (RAD) techniques in line of business application development. Data centric application can be easily developed by simply designing data structures and related UI.

We can easily define the data in Visual Studio LightSwitch.

1. Create a new LightSwitch application in Visual Studio 2010.



2. Click on create new table.



3. Change the table name to company and add the attribute name and their corresponding types.



4. By clicking on data sources add another table and change its name to employee add the attributes and their datatypes.



5. By clicking on data sources add another table and change its name to joining add the attributes and their datatypes.



6. Define the relationship Between employees and joining as many to one by click on relationship tab.



7. By clicking on data sources add another table and change its name to salarydetails add the attributes and their datatypes.



8. Define the relationship Between employees and salarydetails as many to one by click on relationship tab.



Visual Studio LightSwitch Hosting - ASPHostPortal :: Benefits Using Visual Studio LightSwitch

clock November 10, 2011 06:33 by author Jervis

In this article, I will discuss the benefits of using Visual Studio LightSwitch. Ok, lets see this point below:

1. Build business applications like they were created by a professional designer Visual Studio LightSwitch 2011 comes with an extensible set of pre-built Application Shells that can give your application the familiar feel of popular Microsoft software.

2. Build a better application faster Visual Studio LightSwitch 2011 includes templates for the most common types of business applications. It also contains predefined data types for commonly used fields, like phone numbers and e-mail addresses.

3. Simplify development The intuitive Visual Studio LightSwitch 2011 development environment simplifies the development experience and provides assistance when you need it – displaying tools specific to the task at hand. In this environment, you can access the tools you need, when you need them.

4. Evolve your application as business needs change The pre-built templates and components in Visual Studio LightSwitch 2011 are fully extensible, so adding additional features to your application as needed is fast and easy.

5. Quickly add user-friendly features Visual Studio LightSwitch 2011 applications support exporting data to Microsoft Office Excel for easy sharing and reporting, without requiring additional work on your end.Use the asynchronous data loading routines in Visual Studio LightSwitch 2011 to build applications that remain responsive while loading data.

6. Easily add powerful authentication features Built-in authentication models make it simple to provide different users with varying degrees of access and authorization. Visual Studio LightSwitch 2011 automatically generates the administration console for you, giving the administrator a simple, intuitive way to set user roles and permissions.

7. Create a custom application for the way you do business Build your application to do exactly what you need it to. Visual Studio LightSwitch lets you create custom business logic and rules that are unique to your particular business and users. Visual Studio LightSwitch 2011 makes it easy to collect, analyze and reuse information from a variety of data sources including Microsoft SQL Server, Microsoft SQL Azure, Microsoft SharePoint and other 3rd party databases, helping you get the most of your business information.

8. Customize using extensions Custom extensions such as Money and Phone Number business types are included in LightSwitch. Picture and Text layout extensions provide new ways to present data on screen. You can use shell extensions and theme extensions to change the appearance and behavior of an application by changing just one setting.

9. Visual Studio LightSwitch 2011 is a companion to Visual Studio Professional, Premium and Ultimate Visual Studio LightSwitch 2011 works seamlessly with Visual Studio Professional, Premium or Ultimate giving you the best of both. LightSwitch uses the same project templates as Visual Studio Professional making it easy to carry applications into that IDE. If your application evolves to the point where you need to access the tools and features of a more powerful development environment – just upgrade.

10. Speed Deployment and Updates With Visual Studio LightSwitch 2011, you can create one application that can be deployed to desktop clients, browser clients or through the cloud. You can choose the best deployment method based on how and where people work.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.


You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



SQL 2008 Hosting - ASPHostPortal :: How to Copy Data from One Server Database Table to Another Server Database Table in SQL Server

clock October 21, 2011 08:36 by author Jervis

Today, I will explain how to copy data from one server database to another server database table in SQL server.

In this example, I created one table Addresstype in database1 in server1 with some data. I have created same table Addresstype with same columns in database2 in server2. Now I want to fill AddressType table in server2 with data of Addresstype in server1. We need use SQL Server Integration Services to complete this work.

Here are the steps:

1). Open your SQL Server Management Studio and connect to your server here I am connecting server2
2). After that select your database (where ever your table exists select that databse) from your server.
3). Right click on your selected Database go to Tasks under that go to Import data one wizard will open that SQl Server Import and Export Wizard

After that click next in wizard

1).In next wizard select Data Source as Microsoft  OLEDB Provider for SQL Server from dropdown
2).After that enter your Datasource server name here I am entering server1 because I want to get data from table in server1
3).After that select database in that server here I am selecting databse1 because my table in this database and click next
4). Here you need to repeat the same steps from 1 to 3 but here you need to enter destination server details i.e. the server wherever we need to save the data here I am entering server2 and selecting database2 after that click next
5). By default select option copy data from one or more tables or views and click next here you need to select the tables from whichever tables data you need to copy after that click next and after that click finish wait sometime it will display the result .

See these steps in action check from first part continuation onwards this image will run continuously that's why I am saying check this image from first wizard next onwards then it will clear for you.

Done. You can see your table that filled with data from another server.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

-
DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



Press Release - ASPHostPortal Offers Silverlight 5 Hosting For All New and Existing Customer

clock October 19, 2011 05:26 by author Jervis

ASPHostPortal is a premiere web hosting company that specialized in Windows and ASP.NET-based hosting. Today, we are proud to introduce our new Microsoft product, Silverlight 5 Hosting to all our new and existing customer. For more information about this new product, please visit ASPHostPortal official website at http://www.asphostportal.com.

Silverlight 5 adds more than 40 features to the platform, with additions for both premium content viewers and developers.

Silverlight 5 provides advances in rich media and application development. For media experiences, Silverlight 5 will add GPU-accelerated video decoding to reduce the load on the CPU when streaming HD video. This will allow even netbooks to stream 1080p HD video. Microsoft Silverlight 5 beta also offers a new Microsoft XNA-based interface for delivering stunning 3-D visualizations within applications, along with a host of new features that are designed to enhance developer productivity and end-user experiences.

And the Silverlight TrickPlay feature provides the possibility to play videos at different speeds, it also supports fast-forwarding and rewinding. In addition to all of the above, the new Silverlight 5 will be featuring wireless control of all the media contents by making use of remote controllers.

“We are really excited, we really thankful for our team that works very great. This new features are really amazing.” Said Robert Kruger, CEO of ASPHostPortal.com.

For more details about this product, please visit http://asphostportal.com/Cheap-Silverlight-5-Hosting.aspx.

About ASPHostPortal.com:

ASPHostPortal.com is a hosting company that best support in Windows and ASP.NET-based hosting. ASPHostPortal.com have many great plans that can meet your business requirement. For more details about ASPHostPortal.com, please visit the official site at
http://www.asphostportal.com.



ASP.NET MVC 3 Hosting - ASPHostPortal :: How to Change Shared folder location in an MVC 3 site

clock October 14, 2011 08:22 by author Jervis

If you want to change the location of the shared folder in your MVC 3 App, then this is a must read.

When you create a new MVC 3 Web Application Project, a default folder structure is created for you that looks something like this:

To change the shared folder location you must do the following steps.

1. Move the Shared Folder to the Root

Just drag the shared folder out of the views folder to the root of your app, like so:


2. Copy the web.config

In order for the shared folder to work outside the views folder, it has to have a special web.config file within it. Just copy the one inside the views folder and paste it into the shared folder.

3. Edit the _ViewStart.vbhtml Page

Now that the _layout
page has changed its locations, we have to modify the _ViewStart.vbhtml page located in the Views folder, and edit the following:



Remove the “/Views” so now it directs to the _layout
page located in the new shared folder location.


4. Code a Custom View Engine

If you tried to browse the site, now you will get an error like this one:



That is happening because MVC is using the default locations for the partial views, so it's still looking for the _LogOnPartial.vbhtml in its old location, but you moved that file to a new location in the root of your app.

To change the default file location for the whole site, we need to create a new class that inherits from
RazorViewEngine
.

Public Class MyCustomViewEngine
    Inherits RazorViewEngine

    Sub New()

        MasterLocationFormats = New String() {"~/Shared/{0}.vbhtml"}

        ViewLocationFormats = New String() {"~/Views/{1}/{0}.vbhtml", _
                        "~/Shared/{0}.vbhtml"}

        PartialViewLocationFormats = New String() _
            {"~/Views/{1}/{0}.vbhtml", "~/Shared/{0}.vbhtml"}

    End Sub

End
Class

Here, we set new locations for the Master, Views, and PartialViews.

5. Replace the Default View Engine and Test

All we have to do now is plugin this new custom engine, go to the Global.asax file and add the following to the Application_Start():

  Sub Application_Start()
        AreaRegistration.RegisterAllAreas()

        ViewEngines.Engines.Clear()
        ViewEngines.Engines.Add(New MyCustomViewEngine)

        RegisterGlobalFilters(GlobalFilters.Filters)
        RegisterRoutes(RouteTable.Routes)
    End Sub

Now if you run the app, you will notice that it all works with the shared folder new location.

Summary

We managed to change the shared folder location and replace the default razor view engine with our own implementation that changes the locations of the master, views, and partial views of the app.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

-
DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



ASP.NET MVC Hosting - ASPHostPortal :: ASP.NET MVC 4 Preview Released

clock October 10, 2011 06:14 by author Jervis

Woww… Amazing, I am just downloaded ASP.NET MVC preview 4 and I have just created a sample application. It has been integrated with ASP .NET memberships authentication. So you need to have that database schema installed on your SQL Server in order to run the application. So before running make sure that you have this schema installed. Also make appropriate changes to your web.config file.

The connection string is setup in a way that at first operation if you have aspnetdb.mdf file in your system it will install membership schema on your own. The application has login/register and forget password features implemented. I am attaching screen shot of the application that was created by default.

1. Startup Page (default)



2. Login Page



3. Register Page



C’mon. Download it and you can try this new product. And we will launched our new ASP.NET MVC 4 soon. If you need hosting with an affordable price, just visit our site and get your journey with us. J

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

-
DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.



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