ASPHostCentral.com ASP.NET MVC Hosting BLOG

All about ASP.NET MVC 4.0 Hosting, ASP.NET MVC 3.0 Hosting and ASP.NET MVC Hosting articles

ASP.NET MVC 3.0 Hosting :: Getting your ASP.NET MVC Application to return 404 HTTP Status Code

clock August 25, 2011 17:05 by author Administrator

ASP.NET MVC3 includes a new class HttpNotFoundResult in  System.Web.Mvc namespace.

HttpNotFoundResult: Instance of HttpNotFoundResult class indicates to client(browser) that the requested resource was not found. It returns a 404 HTTP status code to the client. Generally we return 404 status code if a requested webpage is not available. In case of MVC applications we return 404 status code is in terms of resources, for example we are searching for particular user profile in the portal, if the user profile is not found, we can return 404.

How to return 404 status code from a MVC application?
First way is to instantiate HttpNotFoundResult class and return the object.

public ActionResult Index()
{
            var result = new HttpNotFoundResult();
            return result;
}


Next alternative is to makes use of HttpNotFound() helper method of the Controller class which returns the HttpNotFoundResult instance.

public ActionResult Index()
{
             return HttpNotFound();
}


we can return 404 along with custom status code description,using the overloded version of HttpNotFound(string statusDescription).

public ActionResult Index()
{
             return HttpNotFound("can not find requested resource");
}

Currently rated 1.5 by 70 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


DotNetNuke 6 Hosting with ASPHostCentral.com

clock August 22, 2011 17:08 by author Administrator

The simplified DotNetNuke 6 user interface dramatically increases productivity by making it much easier to build and maintain Web sites. New pop-up dialogs, a new control panel, updated administration modules and mega-menus combine to deliver a highly modern platform for building and operating websites. The following features are excerpt from http://www.dotnetnuke.com/Resources/Blogs/EntryId/3137/Announcing-DotNetNuke-6.aspx

A New Look
DotNetNuke 6 delivers a fresh new look out of the box with a great looking contemporary skin and a default site template that helps new users get started quickly. Using modern mega-menus and some lightweight containers, DotNetNuke 6 provides the perfect canvas on which to build your next web masterpiece.  

Fully Integrated
For the first time ever, the DotNetNuke Store (Snowcovered.com) and the Extensions Forge, with over 10,000 application extensions, are directly accessible from within the core DotNetNuke platform. The tight integration simplifies the process of finding, purchasing and installing DotNetNuke apps

DotNetNuke in the Cloud
DotNetNuke 6 delivers a platform that is fully compatible with Windows Azure Hosting and provides cloud service integration with the addition of the new Windows Azure Storage and Amazon S3 folder providers. DotNetNuke 6 provides a great foundation for moving to the cloud, whether you need to your whole site to live in the cloud or just your content.

DotNetNuke Commerce
DotNetNuke 6 Professional and Enterprise includes a great new eCommerce module that empowers organizations to quickly add eCommerce capabililities to their website. The new eCommerce module is designed for organizations seeking to deliver a small portfolio of digital goods and services to their end users and is built from the ground up with simplicity and customer experience in mind.

SharePoint Meets DotNetNuke
Available exclusively in the DotNetNuke Enterprise Edition, the Microsoft SharePoint Connector for DotNetNuke enables fast, secure publishing of documents stored in Sharepoint to public web sites, extranets or intranets. Organizations can securely manage their document library within SharePoint and selectively publish those documents using the flexible, cost effective DotNetNuke platform.

DotNetNuke Learns a New Language
DotNetNuke 6 has gotten a major new platform upgrade as the result of a complete conversion to C#. This language change will make it more accessible to a larger development community and allows us to leverage many development tools which have always had strong C# support. The C# version of DotNetNuke has been available for the past year and starting with DotNetNuke 6, it is officially the primary development language of the platform.

Where to go for DotNetNuke 6 Hosting?
ASPHostCentral.com offers the latest
DotNetNuke 6 application to all our new and existing customers. This application is readily available via our control panel and you can install it within 1 (ONE) minute. It just requires several click on your mouse and moreover, it is provided FREE of charge!

You can always start with our
Standard Plan (from @$4.49/month) to get this application installed on your website. Should your requirement changes in the future, you can always request for an upgrade without causing any downtime. Remember, everything is just one-click away from your mouse! So, why wait longer? Please register your interest here.

Currently rated 1.6 by 5 people

  • Currently 1.6/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


ASP.NET MVC Hosting

ASPHostCentral is a premier web hosting company where you will find low cost and reliable web hosting. We have supported the latest ASP.NET 4.5 hosting and ASP.NET MVC 4 hosting. We have supported the latest SQL Server 2012 Hosting and Windows Server 2012 Hosting too!


Sign in