Windows 2012 Hosting - MVC 6 and SQL 2014 BLOG

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

WebMatrix Hosting - ASPHostPortal :: Common Error in WebMatrix

clock March 9, 2012 07:04 by author Administrator
[No text]


WebMatrix Hosting - ASPHostPortal :: New Features WebMatrix 2 Beta

clock March 9, 2012 07:04 by author Administrator

There are bunch of NEW features in WebMatrix 2 Beta on top of WebMatrix 1, but I wanted to just call out few top items:

- Even more seamless and awesome integration with
Application Gallery where now you will not have to fill in the standard application installation parameters

- OSS Application specific code completion which means users of popular apps like WordPress can get help customized to their applications


- Custom look and feel for each Web Application which means if you are editing Umbraco you will feel like WebMatrix is designed for Umbraco with specific contextual actions called out by application authors.


- Intlellisense for HTML, CSS, JS, C#, VB, ASP.NET Razor as well as PHP.


- Support for HTML5, CSS3 as well as jQuery constructs.


- New awesome tools like color picker.


- Completely revamped Database workspace where you can now execute multiple queries.


- Extensibility support by which you can write your own extension for WebMatrix.  And trust me it is so easy that you can whip out a ribbon button to do something cool just within minutes.


- NuGet integration to allow you to build your app with community by your side.


- Remote tools which will allow you to see the server files and even edit them within seconds.


- Integrated learning experience with learnable, pluralsight and appendto


- And more and more…


You can read all about it at
http://webmatrix.com/next

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.

 



SSRS 2008 R2 Hosting - ASPHostPortal :: How to fix Reporting Services permissions are insufficient for performing operation (rsAccessDenied)

clock March 1, 2012 06:00 by author Jervis

If you are getting the following error while trying to access or deploy a SQL Services Reporting Services (ssrs) report server on your localhost:

The permissions granted to user 'domain\username' are insufficient for performing this operation. (rsAccessDenied)


Here's what to do:


1. Make sure you have access configured to the URL
http://localhost/reports using the SQL Reporting Services Configuration. To do this:

- Open Reporting Services Configuration Manager -> then connect to the report server instance -> then click on Report Manager URL.

- In the Report Manager URL page, click the Advanced button -> then in the Multiple Identities for Report Manager, click Add.
- In the Add a Report Manager HTTP URL popup box, select Host Header and type in: localhostClick OK to save your changes.

2. Now start/ run Internet Explorer using Run as Administator...

NOTE: If you don't see the 'Site Settings' link in the top left corner while at
http://localhost/reports it is probably because you aren't running IE as an Administator or you haven't assigned your computers 'domain\username' to the reporting services roles, see how to do this in the next few steps.

3. Then go to: http://localhost/reports (you may have to login with your Computer's username and password)


4. You should now be directed to the Home page of SQL Server Reporting Services here:
http://localhost/Reports/Pages/Folder.aspx

5. From the Home page, click the Properties tab, then click New Role Assignment

6. In the Group or user name textbox, add the 'domain\username' which was in the error message (in my case, I added: JERVIS-PC\JERVIS for the 'domain\username', in your case you can find the domain\username for your computer in the rsAccessDenied error message).

7. Now check all the checkboxes; Browser, Content Manager, My Reports, Publisher, Report Builder, and then click OK.

8. You're domain\username should now be assigned to the Roles that will give you access to deploy your reports to the Report Server. If you're using Visual Studio or SQL Server Business Intelligence Development Studio to deploy your reports to your local reports server, you should now be able to.

Try it and let me know if you have any problem. SSRS 2008 R2 hosting with only $2.00/month. CLICK HERE.

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.



WebMatrix Hosting - ASPHostPortal :: Common Error in WebMatrix

clock February 28, 2012 10:07 by author Jervis

Because Web Deploy is a client-server product, unless it is set up correctly, chances are you will hit a wall pretty quickly at the point where a connection is made. In this blog post, I will show you common solutions for common errors.

Read on for general tips and recipes for fixing common connectivity errors.


General Tips

-
Web Deploy sometimes returns different information in errors messages if you provide administrator credentials vs. non-administrator credentials. If you hit an error, try to run the command as administrator.
-  
Web Deploy sometimes returns different information if source and destination machine are the same vs. destination machine is remote. If you hit an error, try to run it on the remote machine.
-
Run the command with –verbose and –debug switches. These will make Web Deploy spit out more information which can be useful in debugging.

Error: 503 Server Unavailable

Error Trace:

msdeploy.exe -verb:dump -source:apphostconfig,computerName=demo-host

Error: Object of type ‘appHostConfig’ and path ” cannot be created.
Error: Remote agent (URL http://demo-host/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.
Error: An unsupported response was received. The response header ‘MSDeploy.Response’ was ” but ‘v1′ was expected.
Error: The remote server returned an error: (503) Server Unavailable.
Error count: 1.

Why it happens:


- Incorrect destination name or host unreachable.
- Remote Agent Service not installed on destination.

How to fix it:


- Make sure you can ping the remote computer.

- Run this command on the destination in an elevated command prompt: “net start msdepsvc”. This will start the Remote Agent Service on the destination, which allows administrator deployments.

Error: Default credentials cannot be supplied for the basic authentication scheme


Error Trace:

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host
Error: Object of type ‘appHostConfig’ and path ” cannot be created.
Error: The specified credentials cannot be used with the authentication scheme ‘basic’.
Error: Default credentials cannot be supplied for the basic authentication scheme.
Parameter name: authType
Error count: 1.


Why it happens:

-
You are telling Web Deploy to connect to the Web Management Service on the destination. By default, Web Deploy will connect using HTTP Basic Authentication.
-
When using HTTP Basic Authentication, specific credentials must be supplied, which is not true in the command shown above.

How to fix it:

Change the command to:

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType:basic,username=someuser,password=somepassword

Error: The remote certificate is invalid according to the validation procedure.

Error Trace:


msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType=basic,username=someuser,password=somepassword
Error: Object of type ‘appHostConfig’ and path ” cannot be created.
Error: Could not complete the request to remote agent URL ‘https://demo-host:8172/msdeploy.axd?Site=’.
Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Error: The remote certificate is invalid according to the validation procedure.
Error count: 1.

Why it happens:


- You are connecting to the destination using the Web Management Service (wmsvc), which creates an HTTPS connection.
- The certificate on the destination is invalid, so you see this error.

How to fix it:

-
Install a valid wmsvc certificate on the destination
-
OR add the –allowUntrusted flag on the command

msdeploy.exe -verb:dump -source:apphostconfig,wmsvc=demo-host,authType=basic,username=someuser,password=somepassword –allowUntrusted

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.



WebMatrix Hosting - ASPHostPortal :: Passing value within 2 WebPages using Razor syntax

clock February 16, 2012 07:58 by author Jervis

Following will be the example if you would like to use Request QueryString to pass value between 2 CSHTML page.

We have have 2 web pages, Page.cshtml and Page2.cshtml. Under Page.cshtm, there will be a textbox and a button, whatever user enter in the textbox, it will be pass over to Page2.cshtml.

Here the code on Page.cshtml. We use the Request.Form to capture the input by the user from the textbox. The value then store in the variable "formValue" which will be pass over to Name under Response.Redirect.

@{ 
    var formValue = Request.Form["myTextBox"];  
    if (IsPost) 
     { 
         
        Response.Redirect("Page2.cshtml?name=" + formValue); 
         
     } 

<!DOCTYPE html> 
 
<html lang="en"> 
    <head> 
        <meta charset="utf-8" /> 
        <title>Page 1</title> 
    </head> 
    <body> 
 <form action="" method="post"> 
        <input type="text" id="myTextBox" name="myTextBox"/> 
                    <input type="submit" value="submit"/> 
</form>          
    </body> 
</html>


Here's the code on Page2.cshtml, please take note on the previous code Response.Redirect("Page2.cshtml?name=" + formValue); we actually pass the value to the variable named "NAME". so in Page2.cshtml, we will capture the value NAME. We used Request.QueryString to capture the value from the URL which will be
http://localhost/page2.cshtml?name=WHATEVERUSERINPUT.

@{ 
    var queryValue = Request.QueryString["name"];   


<!DOCTYPE html>  

<html lang="en"> 
    <head> 
        <meta charset="utf-8" /> 
        <title>Page 2</title> 
    </head> 
    <body> 
        @queryValue 
    </body> 
</html>

For this example, queryValue will return the value of "WHATEVERUSERINPUT".

Happy coding.

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 3 Hosting - ASPHostPortal :: Use re-mix Library to Add Controller Actions with Mixins

clock February 13, 2012 06:05 by author Jervis

When developing ASP.NET MVC3 application one often needs to add similar actions to different controllers; for example controllers that enable the user to perform the basic CRUD (create, read, update, delete) operations typically contain action methods like Create(), Update() or Delete(). To avoid duplicate code a simple solution could be a common base controller. In complex applications this approach could have some limitations, since .NET does not support multi inheritance, e.g. each controller could have only one base controller.

This blog post shows a prototypically approach how to implement action methods that can be used in more than one controller with the help of the
re-mix library which adds mixins support to .NET. Since the approach shown below is only a proof of concept, it has some limitations that are listed at the end of the post.

After
downloading re-mix and adding references to the dll files contained in the folder net-3.5\bin\release one need a custom controller factory that uses remix’s ObjectFactory to create the controller objects:

public class RemixControllerFactory : IControllerFactory
{
  private IControllerFactory _defaultControllerFactory; 

  public RemixControllerFactory()
  {
    _defaultControllerFactory = new DefaultControllerFactory();
  } 

  public IController CreateController(RequestContext requestContext, string controllerName)
  {
    // Use the default ControllerFactory to get the type of the controller
    var controllerType = _defaultControllerFactory.CreateController(requestContext, controllerName).GetType(); 

    // Use remix's ObjectFactory to instantiate the (mixed) controller
    return (IController)ObjectFactory.Create(controllerType);
  } 

  public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName)
  {
    return SessionStateBehavior.Default;
  } 

  public void ReleaseController(IController controller)
  {
  }
}

The custom RemixControllerFactory is set as the default controller factory in the Global.asax.as file:

protected void Application_Start()
{
  [...]
  ControllerBuilder.Current.SetControllerFactory(new RemixControllerFactory());
  [...]
}

In a next step we implement the interface that defines the action methods (Echo in this example) that will be used to extend the controllers:

public class IEchoControllerMixin
{
  ActionResult Echo(string id);
}


In a last step we implement the IEchoControllerMixin:

public class EchoControllerMixin : Mixin<ControllerBase>, IEchoControllerMixin
{
  public ActionResult Echo(string id)
  {
    var result = new ContentResult();
    var controllerName = Target.ControllerContext.RouteData.Values["controller"].ToString();
    result.Content = string.Format("re-mix added Echo action to controller '{0}'<hr/>You said: {1}", controllerName, !string.IsNullOrEmpty(id) ? id : "<i>nothing</i>");
    return result;
  } 

  [OverrideTarget]
  protected IActionInvoker CreateActionInvoker()
  {
    return new RemixControllerActionInvoker(typeof(IEchoControllerMixin));
  }
}

Due to security reasons ASP.NET MVC only allows to call action methods that are defined in a class that inherits System.Web.Mvc.ControllerBase. Since re-mix creates (automatically generated) proxy objects with their own inheritance structures, ASP.NET MVC does not find the Echo action by default. To bypass this limitation we implement a custom RemixControllerActionInvoker that allows calling actions that are defined in implementations of the IEchoControllerMixin interface. To do this we use reflection to call a non-public ASP.NET MVC functionality that creates an ActionDescriptor that skip the security check:

public class RemixControllerActionInvoker : ControllerActionInvoker
{
  private Type _remixType; 

  public RemixControllerActionInvoker(Type remixType)
  {
    _remixType = remixType;
  } 

  protected override ActionDescriptor FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, string actionName)
  {
    // Use default action descriptor
    ActionDescriptor actionDescriptor = controllerDescriptor.FindAction(controllerContext, actionName);
    if (actionDescriptor != null) return actionDescriptor; 

    // Create action descriptor that accepts actions that are defined in the remix type
    var internalConstructor = typeof(ReflectedActionDescriptor).GetConstructor(
      BindingFlags.NonPublic | BindingFlags.Instance, null, new [] { typeof(MethodInfo), typeof(string), typeof(ControllerDescriptor), typeof(bool) }, null
    );
    return (ActionDescriptor)internalConstructor.Invoke(new object[] { _remixType.GetMethod(actionName), actionName, controllerDescriptor, false });
  }
}

After all the preparations we are finally able to “intermix” the Echo action to any controller:

[Uses(typeof(EchoControllerMixin))]
public class Controller1Controller : Controller
{
}
[Uses(typeof(EchoControllerMixin))]
public class Controller2Controller : Controller
{
}

To test the Echo action in both controllers, just open http://localhost:[...]/Controller1/Echo/Hello or http://localhost:[...]/Controller2/Echo/Hello.

Summarized mixins enable adding actions to controllers without the need of a common base controller; actions defined in mixins are completely decoupled from any inheritance structure and can be added to any controller.

As written in introduction, the approach shown above is only prototypical and has some limitations (which should be resolvable with some additional logic/code):

1. Since the mixin overrides the CreateActionInvoker() of the controller that is “intermixed”, one could neither use more than one mixin in one controller nor use a custom CreateActionInvoker() method.

2. In actions defined in mixins one does not have access to the protected ASP.NET MVC controller methods that create ActionResult objects like View(), PartialView(), Json(), Content(), …

3. One needs to use reflection to call a protected ReflectedActionDescriptor constructor.

4. The RemixControllerActionInvoker implementation does not consider the action parameter when creating the action descriptor. In result the action names defined in the mixins needs to be unique.



Windows 2008 Hosting - ASPHostPortal :: Tips on Windows Command Prompt

clock January 13, 2012 07:34 by author Jervis

In this article we are going to see various commands and comments which I have gathered through my experience with Windows. Surely, you may know several commands on Windows, however many people may not know all of them.

The commands that we are going to see here are based on Windows XP the most commonly used today. Also, we are going to see how to make windows command prompt more friendly.

Basic Tips on Making Windows Command Prompt Friendly

When you open a session of it (Start >> Run >> cmd), by right-clicking the title bar, you can easily set default options for it. Selecting the “Properties” Menu will pop-up the title bar to set options which will be valid for all Windows prompt.

In the tab “Options” you may choose your cursor size, number of items in the command history and editing modes, including mode off “Insert” which by default eats the letters when you type on others.

In tab “Source”, it does not needfully define the source (it supports few, the”raster fonts”), simply the number of rows and columns of the window.

You can click the tab “Layout” and choose the default position of the window (ie. fixed distance from left and top of your screen) and the tab “Colors” to change the colors of black background.

Following are few shortcuts and commands that can be used:

1. Press [ALT] Left + [ENTER]: It is used to switch between full screen and window. Also applies to programs that open full screen in the simulation environment from MS-DOS, such as many games and control programs. In this case, usually the window will be minimized, showing the desktop, and the program paused. When the windows is minimized, the simulation program in MS-DOS is not being processed, for example, a game of any other program that is minimized will be paused until the window is active.

2. File names with spaces: Never forget to enter them in quotes. The spaces are the separators of parameters to pass file names without quotation marks to point to the computer means that the shares after the new space are parameters, and not a continuation of the file name you enter.

3. In order to copy text in command prompt, you need to right-click in the window and select “Mark”. Once you select the “Mark” option, drag the mouse normally, but do take care that it selects a block of characters and not in line as usually you do in a text editor. Being with selected text, simply right-click the window again or you may press ENTER button on your keyboard. The selection will get cleared the text will be copied. Now in order to paste the text, you need to right-click and select the “Paste” option.

4. It’s a very silly tip, but worth comment. If you wish to copy everything, you may right-click and choose “Select All” option. If you want to clear out the window, simply enter “cls” command to clear the past performance on the screen.

5. Without using a mouse the Options can also be accessed through the Control menu. Just press [ALT] Left + [SPACE] and use the arrow keys on your keyboard to access the options or copy text. It is very useful when running Windows in order insurance if you have a serial mouse, since it does not load the device in safe mode.

6. To view the information about a particular command, simply enter the command: help [commandname]. Remove the brackets before entering the commands. Another way to retrieve the info about a command is to enter the command: “commandname/?”. It applies to most of the programs but not all of them.

7. If a particular command is about to complete, you can force it to stop by typing [CTRL] + [C] in the command prompt. Be cautious while using this command, as it may compromise the system or user data.

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 3 Hosting - ASPHostPortal :: Web Configuration Connection String setting in ASP.Net MVC 3 using Entity Framework

clock January 12, 2012 07:47 by author Jervis

In this article I will describe how to set the Web configuration file in ASP.Net MVC 3 using Entity Framework with object class mapping.

In your ASP.Net MVC 3 applications supposes you are using object class mapping using Entity Framework.

That means you write your classes using relationships and the classes will be converted to a table in the database. For that you have to set your Web .config file connection string setting. Because the connection string results in mapping a class to a table in the database and the data from the table will also come from the database.

Step 1:

First go to the Web config page for the main project like Figure 1:



Step 2:

Then comment the existing connection string code. (The existing code will not work for creating the tables from the mapping classes (POCO) classes).

After that paste the code shown below like figure 2:



So in this article we have learned how to change the connection string in the web.config file for ASP.Net MVC 3 using Entity Framework.

 

 



WebMatrix Hosting - ASPHostPortal :: Deploy WebMatrix at ASPHostPortal

clock December 12, 2011 07:06 by author Jervis

This article is intended to give you some background information about Microsoft WebMatrix and why I have chosen to use it for my Web projects. It includes instructions for where to find it and how to download and install it.

Just because it’s simple doesn’t mean to say that you can’t use it as the first step towards more complex web design and development.

I like it because it’s a really quick and easy way to get a synchronized local and remote web development setup up and running. Almost straight away, I can, at the touch of a button, download and install one of several ASP.NET open source web application (such as MojoPortal) and get it running locally with a MS SQL Database.

Once you have your website up and running locally, you can publish it to your hosted website. This should be very simple, but there are a couple of gotchas. This series of article should help you navigate safely around those.

The first issue is making sure your host provides you with the required functionality. If you’re using ASPHostPortal.com ASP.NET web hosting, you will have that.

WebMatrix supports two protocols for web hosting: WebDeploy and FTP. FTP does not support publishing of MS SQL databases, so you should use the WebDeploy protocol.


In order to publish your website, you will need to enter the publish settings for WebDeploy. You can enter the settings manually each time you publish, or create a publish settings XML file.

If you later want to switch back to developing or maintaining your website locally, it’s a straight-forward task to use WebMatrix to download your published site. You should note that uploading or downloading an MS SQL Database through WebMatrix replaces the entire file (it does not merge changes), so you should not work on your local and remote websites at the same time.

WebMatrix itself is installed through Microsoft Web Installer. Click on the ‘install WebMatrix’ button and follow the instructions via
this link.

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 3 Hosting - ASPHostPortal :: When to use ViewBag, ViewData, or TempData in ASP.NET MVC 3 Applications

clock December 7, 2011 09:02 by author Jervis

"When should I use a ViewBag vs. ViewData vs. TempData objects?" -- a frequent question in online forums, during presentations, and at events. There are enough similarities and differences between these objects that warrant a closer look to see exactly how you can use each of these objects while developing MVC applications.

All three objects are available as properties of both the view and controller. As a rule of thumb, you'll use the ViewData, ViewBag, and TempData objects for the purposes of transporting small amounts of data from and to specific locations (e.g., controller to view or between views). Both the ViewData and ViewBag objects work well in the following scenarios:

·         Incorporating dropdown lists of lookup data into an entity

·         Components like a shopping cart

·         Widgets like a user profile widget

·         Small amounts of aggregate data

While the TempData object works well in one basic scenario:

·         Passing data between the current and next HTTP requests

If you need to work with larger amounts of data, reporting data, create dashboards, or work with multiple disparate sources of data, you can use the more heavy duty ViewModel object. See the details post about ViewModels at here.

ViewData & ViewBag objects

- ViewData

ViewData is a dictionary object that you put data into, which then becomes available to the view. ViewData is a derivative of the ViewDataDictionary class, so you can access by the familiar "key/value" syntax.

- ViewBag

The ViewBag object is a wrapper around the ViewData object that allows you to create dynamic properties for the ViewBag.


Both the ViewData and ViewBag objects are great for accessing extra data (i.e., outside the data model), between the controller and view. Since views already expect a specific object as their model, this type of data access to extra data, MVC implements it as a property of both views and controllers, making usage and access to these objects easy. 

The syntax and usage of the ViewBag, ViewData, and TempData objects are outlined in the following code sample, which populates a featured product object that a view renders as in a bakery's home page:

public class HomeController : Controller
{
    // ViewBag & ViewData sample
    public ActionResult Index()
    {
        var featuredProduct = new Product
        {
            Name = "Special Cupcake Assortment!",
            Description = "Delectable vanilla and chocolate cupcakes",
            CreationDate = DateTime.Today,
            ExpirationDate = DateTime.Today.AddDays(7),
            ImageName = "cupcakes.jpg",
            Price = 5.99M,
            QtyOnHand = 12
        };   

        ViewData["FeaturedProduct"] = featuredProduct;
        ViewBag.Product = featuredProduct;
        TempData["FeaturedProduct"] = featuredProduct;     

        return View();
    }
}

The Index.cshtml view renders the Product object by accessing the code with the same syntax as in the controller. Notice that you'll have to cast the ViewData and TempData objects, but not the ViewBag.

@using FourthCoffee.Models;
@{   
    ViewBag.Title = "Home Page";
    var viewDataProduct = ViewData["FeaturedProduct"] as Product;
    var tempDataProduct = TempData["FeaturedProduct"] as Product;               
}
<h2>Welcome to Fourth Coffee Bakery</h2>
<div>
    <a href="/Products">
    <img src='@Url.Content("\\Content\\Images\\cake.jpg")' alt="Fourth Coffee Bakery"/>   
    </a>
    <div>
        Today's Featured Product is!
        <br />
        <h4>@ViewBag.FeaturedProduct.Name</h4>
        <h3>@viewDataProduct.Name</h3>
        <h2>@tempDataProduct.Name</h2>
    </div>
    @Html.ActionLink("Test Tempdata","Featured")
</div>

The ViewBag object lets you add dynamic properties to it which makes it a very versatile tool.

Although all three display something when this view renders, but the TempData can be troublesome when used in this manner, and here's why...

TempData

TempData is meant to be a very short-lived instance, and you should only use it during the current and the subsequent requests only! Since TempData works this way, you need to know for sure what the next request will be, and redirecting to another view is the only time you can guarantee this. Therefore, the only scenario where using TempData will reliably work is when you are redirecting. This is because a redirect kills the current request (and sends HTTP status code 302 Object Moved to the client), then creates a new request on the server to serve the redirected view. Looking back at the previous HomeController code sample means that the TempData object could yield results differently than expected because the next request origin can't be guaranteed. For example, the next request can originate from a completely different machine and browser instance.


As described below, the syntax for using TempData is the same as ViewData.

// TempData sample
public ActionResult Featured()
{
    var featuredProduct = new Product
    {
        Name = "Assorted Cupcakes",
        Description = "Delectable vanilla and chocolate cupcakes",
        CreationDate = DateTime.Today,
        ExpirationDate = DateTime.Today.AddDays(7),
        ImageName = "cupcakes.jpg",
        Price = 5.99M,
        QtyOnHand = 12
    }; 

    ViewData["FeaturedProduct"] = featuredProduct;
    ViewBag.Product = featuredProduct;
    TempData["FeaturedProduct"] = featuredProduct; 

    //After the redirect, the ViewBag & ViewData objects are no longer available
    //Only TempData survives a redirect 

    return new RedirectResult(@"~\Featured\");
}

However, once the controller redirects, the ViewBag and ViewData will contain null values. If you inspect the TempData object with debugging tools after the redirect you'll see that it is fully populated with a featured product. This is because the redirect is that only, subsequent, request, so only it can access the TempData object without worry.

@using FourthCoffee.Models;
@model FourthCoffee.Models.Product
@{
    ViewBag.Title = "Details";
    var featuredProduct = TempData["FeaturedProduct"] as Product;
}

The customary Session object is the backing store for the TempData object, and it is destroyed more quickly than a regular session, i.e., immediately after the subsequent request. Because of its short lived scope, it's great for passing error messages to an error page.

Now that you've seen how and when to use ViewData, ViewBag, and TempData objects, you might be wondering what to do when using larger sets of data or more complex scenarios. Fortunately, MVC has ways to deal with these commonly needed scenarios.

Thinking outside the ViewBag

Your requirements might need you to represent the following types of data, which do not fit in well when using ViewBag, ViewData, or TempData objects. The MVC 3 framework contains ViewModel objects for when you need more than ViewData. The type of data that suits ViewModels well is as follows:

·         Master-detail data

·         Larger sets of data

·         Complex relational data

·         Reporting and aggregate data

·         Dashboards

·         Data from disparate sources

You'll likely run into these or similar scenarios during the app development process.

Summary

The ViewData and ViewBag objects give you ways to access those extra pieces of data that go alongside your model, however for more complex data, you can move up to the ViewModel. TempData, on the other hand, is geared specifically for working with data on HTTP redirects, so remember to be cautious when using TempData.

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.

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