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 5 Hosting-ASPHostPortal.com :: Upgrade ASP .NET MVC 5 default layout to bootstrap 3

clock December 26, 2013 12:59 by author Robert

If you have started developing web applications with ASP .NET MVC 5 you might have noticed that it comes with bootstrap version 2 and the latest version 3. In order to upgrade the default template for version 3, you can use these files as a reference.
Right click solution -> Manage NuGet packages Updates -> Update bootstrap to version 3

***
Views/Shared/_Layout.cshtml
*** 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>
    <div class="navbar navbar-default navbar-static-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" })
            </div>           

            @Html.Partial("_LoginPartial")
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active">@Html.ActionLink("Home", "Index", "Home")</li>
                    <li>@Html.ActionLink("About", "About", "Home")</li>
                    <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li class="divider"></li>
                            <li class="dropdown-header">Nav header</li>
                            <li><a href="#">Separated link</a></li>
                            <li><a href="#">One more separated link</a></li>
                        </ul>
                    </li>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </div>
    <div class="container">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
    </div>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>

 

***
Views/Shared/_LoginPartial.cshtml
*** 

@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-form pull-right" }))
    {
    @Html.AntiForgeryToken()
    <ul class="nav navbar-nav navbar-right">
        <li>
            @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
        </li>
        <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
    </ul>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}


*** Content/Site.css *** Remove padding-top from body

 



ASP.NET MVC 4 Hosting - ASPHostPortal.com :: A Best Practice for Authenticating Users in ASP.NET MVC 4

clock December 20, 2013 06:16 by author Robert

If your site has even one or two actions where access is restricted to particular users, the smart thing to do is to restrict access to all the actions on your site and then selectively permit access to those actions that all users are allowed to request. That way, an error of omission (forgetting to make a method available) simply prevents users from accessing some action.

Unfortunately, by default ASP.NET MVC works exactly the opposite way: all actions are accessible to all users unless you specifically restrict access by applying the Authorization action filter to the method. Under this scenario, an error of omission (forgetting to put an Authorize attribute on a method) allows all users access to the action. It's literally the worst thing that can happen in a secure environment: unauthenticated and unauthorized access to a resource that should have been secured.

Global Filters provided a solution to this by allowing you to apply the Authorize attribute to all of your action methods, locking non-authenticated users out of your actions by default. You can then selectively override that setting by applying the Authorize attribute to individual methods, specifying specific roles and users authorized to use that action. That works, unless you have some action methods that don't require authentication, methods intended to be accessible to the general public. In that scenario, you can't use Global Filters to secure all of your action methods -- until ASP.NET MVC 4.

Implementing the best practice is possible in ASP.NET MVC 4 with the new AllowAnonymous action filter. The first step is to use the Global Filters in the FilterConfig class in the App_Start folder to apply the Authorize attribute to every action method:

public class FilterConfig
{
  public static void RegisterGlobalFilters(GlobalFilterCollection filters)
  {
    filters.Add(new AuthorizeAttribute);
  }
}


The next step is to selectively allow access to actions that don't require authentication by decorating them with the AllowAnonymous attribute:

[AllowAnonymous]
Public ActionResult Get()
{

 



Enterprise Email Hosting :: ASPHostPortal.com Launches Reliable and Scalable Enterprise Email Hosting

clock December 17, 2013 05:13 by author Ben

ASPHostPortal.com, a leading Windows web hosting provider, proudly announces Enterprise Email Hosting for all costumer. With Enterprise Email Hosting Services from ASPHostPortal.com, you’ll find the perfect hosted email solution for your small business. These professional tools and features enable you to access and manage your email and communicate and collaborate from your desktop or mobile devices anywhere in the world.

Enterprise Email Hosting uses the Internet to communicate information about promotions, company offerings, product updates and more. It is a valuable dialogue between a prospective or current customer and a company. Enterprise Email Hosting is more cost effective, and achieves results faster than traditional direct mail marketing. Most importantly, This service is twice as effective as traditional direct mail in getting a response from the targeted audience.

ASPHostPortal.com offer Enterprise Email hosting with the following features:

  • 2 GB Mailbox Space
  • Support Blackberry
  • WebMail Access
  • POP/SMTP/IMAP
  • Total Bulk Email up to 10.000 emails/month

"An  enterprise email hosting account costs $8.00 per month and gives you 10 mailbox that you can access using your smartphone especially Blackberry, Webmail and POP3 Email programs like Outlook.  Once it is ordered it is available to use immediately."said Dean Thomas, Manager at ASPHostPortal.com.

Web hosting is gaining huge amount of popularity because of its several benefits. The most popular hosting of all is Email hosting. A good email hosting has the ability to protect all the important emails.

Where to look for the best email hosting service? How to know more about the different types of hosting services? Read more about it on http://www.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.com 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.



Visual Studio 2013 Hosting :: What’s new in Visual Studio 2013?

clock December 12, 2013 05:47 by author Mike

Visual Studio 2013 is New versions of Visual Studio usually coincide with updates to the .NET Framework and one of our biggest releases yet. It comes purpose-built to help you thrive in an environment in which ideas are at a premium and speed is of the essence.

This post lists out the ASP.NET features that you get when you create a project in VS 2013 and a brief introduction about them. Visual Studio 2013 allows you to work interactively with the rendered page markup, fully integrated with the source code that rendered it.


From the .NET developer's perspective, highlights include:

  • Automatic binding redirection support
  • LOH compaction
  • EventSource improvements
  • Better overall performance.
  • 64bit Edit and Continue
  • Better async debugging
  • Call stack visualization
  • Editor improvements
  • Enhanced scrollbar functionality
  • Inline Viewing of definitions
  • Better XAML design time support
  • New Team Explorer home page. It’s a bit more visually appealing and provides access to things like your web based task board. But, my favorite thing of all, is that it includes the list of solutions in your workspace. This gives you an unbelievably nice “home” from which you can navigate to whatever you are looking for. So, as soon as you connect to your Team Project, you can just click on the solution you want to work on and switch between them easily.

love Visual Studio 2013

In addition to the next round of improvements to our web based test case management solution, today Microsoft introduced a preview of a brand new service –cloud load testing. Since VS 2005, Microsoft supported Load Testing. It allows you to validate performance, scale and reliability of your server apps. However, you have to set up and configure your own infrastructure to run load tests. With our new Team Foundation Service based load test solution, you can now load test your apps without configuring any infrastructure. Just use Visual Studio Ultimate Edition to create a load test and point it at Team Foundation Service and soon you have load test results for your application. It is going to be particularly valuable for people building Azure applications who want to verify the scalability of their apps before opening them to a broad user base.

why to love Visual Studio 2013

In my personal opinion it is very useful feature, because right now in 2012 Visual Studio load and perfomance testing so painful and lie gonna be a bit easier after this feature is available. We are using load testing in Azure and it is very nice to find bugs and optimize our projects in further.

Visual Studio 2013

To run a cloud based load test on Team Foundation Service, just create/record a load test and choose the option in your test settings.It keeps getting better. Scott Hanselman for an update on next version of Visual Studio 2013. New ASP.NET dialog, amazing CSS3 support, new scaffolding engine, ASP.NET MVC 5, Web API 2, Web Forms, SignalR 2, and also learn about OWIN, ASP.NET identity improvements and much more!

I am hoping that this post would be a starting point to learn about the new features and then you can drill down into the details of these features.



Free, Best and Reliable Entity Framework 6 Hosting with ASPHostPortal.com

clock December 10, 2013 06:57 by author Ben

Entity Framework is actively developed by the Entity Framework team which is assigned to the Microsoft Open Tech Hub and in collaboration with a community of open source developers. Together we are dedicated to creating the best possible data access experience for .NET developers.
The Entity Framework version 6 Release Candidate is now available to developers for immediate download. The open source object-relational mapper is designed to enable .NET developers to work with relational data using domain-specific objects. Entity Framework allows programmers to create a model by writing code or using boxes and lines in the EF Designer. Both of these approaches can be used to target an existing database or create a new database.


There are The Top features of Entity Framework 6 :

  • Connection Resiliency - enables automatic recovery from transient connection failures.
  • Async Query and Save - dds support for the task-based asynchronous patterns that were introduced in .NET 4.5. With .NET 4.5 Microsoft introduced async and await keywords but in EF 5 Microsoft didn't have time to add support for async query and save but now with EF6 it is supported.
  • Code-Based Configuration - gives you the option of performing configuration - that was traditionally performed in a config file - in code.
  • Dependency Resolution - introduces support for the Service Locator pattern and we’ve factored out some pieces of functionality that can be replaced with custom implementations.
  • Interception/SQL logging - provides low-level building blocks for interception of EF operations with simple SQL logging built on top.
  • Testability improvements - make it easier to create test doubles for DbContext and DbSet.
  • Features that come for free - These are capabilities that are part of the core. You don’t even have to know they’re there to benefit from them, much less learn any new coding. This group includes features such as performance gains brought by a rewritten view-generation engine and query compilation modifications, stability granted by the ability of DbContext to use an already open connection, and a changed database setting for SQL Server databases created by Entity Framework.
  • DbContext can now be created with a DbConnection that is already opened - which enables scenarios where it would be helpful if the connection could be open when creating the context (such as sharing a connection between components where you can not guarantee the state of the connection).


Top Reasons To Choose Entity Framework 6 Hosting

  • Fast and Secure Server - Our powerfull servers are especially optimized and ensure the best Entity Framework 6 performance. We have best data centers on three continent, unique account isolation for security, and 24/7 proactive uptime monitoring.
  • Best and Friendly Support - Our support team is extremely fast and can help you with setting up and using Entity Framework 6 on your account. Our customer support will help you 24 hours a day, 7 days a week and 365 days a year.
  • Dedicated Application Pool - With us, your site will be hosted using isolated application pool in order to meet maximum security standard and reliability.
  • Uptime & Support Guarantees - We are so confident in our hosting services we will not only provide you with a 30 days money back guarantee, but also we give you a 99.9% uptime guarantee.
  • World Class Control Panel - We use World Class Plesk Control Panel that support one-click installation.

So, you'll get the best, cheap and reliable Entity Framework 6 hosting with us. Why wait longer?



Free Windows Server 2012 Hosting - ASPHostPortal.com :: New Powershell v3 with Windows Server 2012

clock December 7, 2013 06:25 by author Ben

PowerShell v3.0 is the version included with Server 2012. A great place for PowerShell newbies to get started is with PowerShell's IntelliSense. This feature will help you learn and create the proper PowerShell. As you type in a PowerShell command, you'll see a list of possible syntaxes to go with the command.

 


For example, you may want to install a feature through PowerShell, but are unsure of the proper syntax or exact feature name. Features can be installed through PowerShell with the command instaW-windowsfeature-name. If you go into the Windows PowВ­erShell ISE (integrated scripting engine) and start typing Install . You'll see a dropВ­down menu of all the possible commands that can be used with Install (image 1).

Image 1 - PowerShell IIntelliSense

Image 1 - that you also have a list of modules to scroll through to find the available cmdlets in PowerShell. PowerShell in Server 2012 provides command-line management , and with IntelliSense, also teaches you how to use correct PowerShell syntax at the same time.

WHile there are numerous new capabilities in PowerShell, another significant new feaВ­ture that many of you will want to get acquainted with is Windows PowerShell  Web Access. This feature allows you to manage remote machines using PowerShell through a web browser.


To set up this feature, follow these steps:

1. From Server Manager 's dashboard, click "Add roles and features." Click Next and select "Role-based or feature-based installation." Click Next. Select the server for installation. Click Next again. In the "Select server roles" window, click Features from the left-side menu. Scroll through the features until you see "Windows PowВ­erShell (Installed)." Expand this feature, and Windows PowerShell Web Access  is listed.



2. Select Windows PowerShell Web Access and click Add Features. Click Next three times and then click Install.

3. To automatically configure Windows PowerShell Web Access to use default settings, run Install-PswaWebApplication as an administrator in PowerShell.
After installation, you will see IIS listed in the Server Manager dashboard. The next step in setting up PowerShell Web Access is to configure IIS. In this example, you'll set up PowerShell Web Access in an IIS subfolder:


a. From Server Manager, click Tools and then IIS Manager. Now you need to create an application pool, which is done by expanding the IIS server name, right-clicking on Application Pools, and then selecting Add Application Pools.

b. Name the PowerShell Web Access application pool and click OK.

 

 



c. Right-click the Sites Folder under Default Web Site in the left hand IIS Manager pane. Select Add Application.

d. Enter an alias for the application and browse to select the application pool created in PowerShell Web Access. Also enter the physical path to PowerShell Web Access, which is file:///c:windowswebpowershellwebaccesswwwroot"C:WindowsWebPowerShellWebAccesswwwroot Configure and check authentication by using the "Connect as" and "Test settings" buttons. Click OK.

You can remotely use PowerShell Web Access through a browser by entering the name of the computer PowerShell Web Access is installed on and the name of the PowerShell Web Access Application as a URL in a browser.

SO, for this example, the machine name is DC1 and the PowerShell Web Access Application name is PSWA. After entering the URL http://dc1/pswa > Http://DC1/PSWA , We get the logon screen shown.



ASPHostPortal.com Windows Hosting Support WordPress 3.7.1

clock December 4, 2013 05:55 by author Mike

WordPress 3.7.1 is in development including much requested features and fast on the heels of the 3.6 release. There are some great changes in store for WordPress users soon, but most will not be visible changes for website visitors. WordPress is an open-source content management system (CMS) that can be used for anything from a personal blog to a full business site.

WordPress 3.7.1 can be upgraded to (or installed) using any of Installatron's products. Use Installatron's optional Automatic Update feature to automatically apply WordPress updates as new versions are released, or use Installatron's Clone feature to duplicate an existing WordPress install to test the 3.7.1 upgrade prior to applying it live.

WordPress 3.7.1 Features
The features listed below are the main attractions of this new version of WordPress:

  • Automatic updates - This is perhaps the most anticipated feature of WordPress 3.7.1 now, whenever an update is available, WordPress will automatically update your current version. Automatic updates will save a lot of time for a number of individuals. However, individuals who do not want this feature will have the option to turn it off.
  • New Password - This meter will encourage people to choose stronger passwords that the previous version’s meter did not really do.
  • Language Packs Feature - New language packs have been introduced to support other languages better.
  • New WordPress search - This option allows the search to be more efficient than ever before.

Reasons to Use WordPress 3.7.1
This release features some of the most important architectural updates we’ve made to date. Here are the big ones:

  • Updates while you sleep - With WordPress 3.7.1, you don’t have to lift a finger to apply maintenance and security updates. Most sites are now able to automatically apply these updates in the background. The update process also has been made even more reliable and secure, with dozens of new checks and safeguards.
  • Stronger password recommendations - It’s best to create passwords that are complex, long, and unique. To that end, our password meter has been updated in WordPress 3.7.1 to recognize common mistakes that can weaken your password: dates, names, keyboard patterns (123456789), and even pop culture references.
  • Better global support - Localized versions of WordPress will receive faster and more complete translations. WordPress 3.7.1 adds support for automatically installing the right language files and keeping them up to date, a boon for the many millions who use WordPress in a language other than English.


IIS Hosting - ASPHostPortal.com :: How to Checking and Setting up the Correct Permissions on the IIS Server

clock December 3, 2013 10:56 by author Mike

If you are using an Classic ASP, ASP.NET or PHP application on a Windows Server that requires that you write data or upload to a folder then you will need to check and if necessary change the permissions on the server so that you have write as well as read permissions on the directory and files you wish to write too.


To check or change the permissions on the server go to Windows Explorer and do the following (for NT and Win 2K users only using NTFS file system, Win XP Pro users see note at bottom):
1. Right click on the directory containing the database or text file.
2. Click on 'Properties'.
3. Choose the 'Security' tab form the dialog box window.
4. Uncheck 'Allow inheritable permissions from parent to propagate to this object', from the bottom of the dialog box.
5. Next, click on the 'Add' button at the top left of the window.

Security Properties Dialog Box

6. Next the 'Select Users or Groups' dialog box will open, highlight 'IUSR_MyComputer' account from the list by clicking on it. Where 'MyComputer' is this will be the name of your computer. 'IUSER' is the Internet Guest Account setup by default when IIS is installed on the system.

Select Users or Groups Dialog Box

7. Next click on the 'Add' button in the middle left of the dialog box. You should then see 'MyComputer\IUSER_MyComputer' appear in the box in the bottom half of the dialog box. Again where 'MyComputer' is will be the name of your computer.
9. Now click on the 'OK' button at the bottom right of the 'Select Users or Groups' dialog box.
10. You should now be back at the 'Security Properties' dialog box where the top box should now contain the 'Internet Guest Account (MyComputer\IUSER_MyComputer)'.
11. Highlight the 'Internet Guest Account (MyComputer\IUSER_MyComputer)' by clicking on it in the top box.
12. Select 'Read' and 'Write' permissions for this account by checking the boxes at the bottom of the window (If you are not to worried about security you could check all the boxes to make sure that you have no problems with permissions).

Security Properties Dialog Box

13. Next repeat all the steps above on the database or text file itself, to make sure the database or text file also has the correct permissions.



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


Author Link


Corporate Address (Location)

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

Sign in