DotNetNuke Hosting with ASPHostPortal.com

BLOG about DotNetNuke CMS, latest technology and Special DotNetNuke Hosting Package with ASPHostPortal.com

ASPHostPortal.com Proudly Announces DotNetNuke 7.4.2 Hosting

clock November 3, 2015 21:20 by author Dan

ASPHostPortal.com is considered one of the best among the many web hosts and is very well-known for reliable servers and most of all exceptional customer service. It relies on the customer satisfaction and hence we offer great prices as well as quality service and most of all the reliability that customers expect in a web hosting site. To keep updated our customer’s website, today we launch DotNetNuke 7.4.2 with cheap price, best support, and high speed connection.

DotNetNuke is the undisputed leader when it comes to Web Content Management for Microsoft ASP.NET. More than 700,000 production websites worldwide use this path breaking technology to manage their websites. DotNetNuke open source Content Management Platform functions as a web application development framework also. This application offers something for everyone so on the basis of your role in the organization you can utilize its powerful utilities to achieve your web initiatives.

DotNetNuke is a brilliant combination of Content management System (CMS) and Web application development framework. This adaptable architecture allows developers to effortlessly add functionality or make changes in the look of the website through the addition of DotNetNuke applications. There are lots of websites where you can find free applications, you can use or customize these applications according to your need. That is reason DotNetNuke has become the first choice of developers.

As one of the most popular and fastest growing hosts, ASPHostPortal.com has exceptional reliability. We have a world class data center that provides top of the industry uptime and multiple functional administrative tools. We offer a top notch and reliable customer service team. Given that Customer Service can be a key differentiator when comparing web hosts, our expert support team always carefully scrutinizes this element. To learn more about our DotNetNuke 7.4.2 Hosting, please visit http://asphostportal.com/Dotnetnuke-7-4-2-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP 5. x, etc. Their service include shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting - ASPHostPortal.com :: How to Solve DotNetNuke.Services.Exceptions.PageLoadException Problem

clock Oktober 26, 2015 20:36 by author Dan

Problem:

If you have deleted or your dotnetnuke installation failed to install DDR Menu module, you will get following.

an error has occurred. DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions() at DotNetNuke.UI.Containers.ActionButtonList.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

OR

An error has occurred.DotNetNuke.Services.Exceptions.PageLoadException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) ---> System.ApplicationException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.DDRMenuControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Solution

It is a good news if you are installing your new dnn instance, you can download latest installation source from dotnetunke.codeplex.com and that will work just fine.

If you are already having dnn site running and you uninstalled the  DDR menu  by mistake, or you are upgrading the site or DDR menu  and that caused this problem, there are some ways to fix this.

Download and setup local copy of fresh dnn installation and do following:

  • Open web.config of fresh install, and search ddr in it. Copy the DDR entry from it and paste it to appropriate section of your site's web.config.
  • from fresh install replace /admin/menus and /desktopmodules/ddrmenu folders to your site folder.
  • download  http://dnnddrmenu.codeplex.com/releases/70987/download/264940 and paste it into /install/module folder
  • Browser for yoursite.com/Install/install.aspx?mode=InstallResources and that's it

In my case, we were trying to upgrade the DDR menu and found the broken site that was restored using above steps.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com : How To Enable Google Analytics on a DotNetNuke Website?

clock Oktober 22, 2015 21:25 by author Kenny

How To Enable Google Analytics on a DotNetNuke Website?

Google Analytics is one of those must-have tools when running a website.  The tasks of tracking traffic sources, browser versions, search terms, etc. are all made easy.  The developers of DotNetNuke have also made using Google Analytics on a DotNetNuke website simple.

Installing Google Analytics in DotNetNuke is a fairly common request from many individuals and I know it can be a quite troubling question for most. The primary questions are how and where can I put the javascript code provided by Google. Well you have a few options. First you could put the code directly in the skin for the site, the advantages to that would be that you will automatically have the code on all pages, however, the disadvantage is that you cannot use that skin as is on another portal due to the site specific Google information. I personally go the route of adding a text/html module to my site and set it to show on every page and insert the script in a very specific location which I will discuss below. There are a few drawbacks to this method. First you will not get any statistics information on traffic to "edit pages" where other modules are not displayed and you also will not receive information regarding administration modules. However, in most circumstances this shouldn't be an issue.

The best way to include this information is to include the information in the Module header of the text/html module. This is to prevent the accidental removal of the script code if you happen to click inside the module as an admin to enter in-line edit mode. Below I will walk you through the steps needed to implement Google Analytics using this method. (NOTE: you can extend this for other javascript integrations if needed).

Step By Step

  • Add a new Text/HTML module to a page of your site, you can position it anywhere, but I recommend the bottom of the page as administrative users will still see the module when they are logged in
  • Edit the text of the module to contain no text
  • Enter the module settings from the SolPart Action Menu
  • Expand the "Advanced Settings" section
  • Check the box next to "Display Module On All Pages?"
  • Insert your Javascript code in the "Header" box. This will ensure that the data is always retained
  • Now under "Page Settings" -> "Basic Settings" un-check the following boxes
    • Display Container
    • Allow Print
    • Allow Syndicate
  • Ensure that the "Cache Time" is set to 0 (Caching appeared to cause issues with this implementation in my testing)
  • Click "Update" to save your changes

This should complete the setup. You may now test to ensure everything is functioning correctly. You can log out as an administrator and view your site and no extra content should be displayed however if you look at the generated source you should see your javacript listed. Google Analytics should update within about 15 minutes to show that they are receiving your data.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com :: Share Your DNN Portal With Cross Portal Sharing

clock Oktober 19, 2015 18:48 by author Dan

DNN cross portal sharing, which means that articles from a portal can be shared or displayed on other portals within the same DNN installation, without having to add the same articles again into your DNN. Articles can be edited only on the portal where they have been added into your DNN module, and they can be displayed on an unlimited number of portals. Article details are opened on the current portal, that is, they do not lead to the portal they have been taken from.

Sharing the articles via cross portal sharing can be set up exclusively by the SuperUser.

To enable sharing articles onto other portals, it is necessary to click on the "Cross portal sharing" icon in the Dashboard of  your DNN.

On "Cross portal sharing" administrator's page, all the portals you have within the same DNN installation will be displayed.

To enable sharing content across portals, click on the radio button "Select portals", which will open the "Select portals" link. By clicking on it, a pop-up will open, allowing you to select which portal or portals you want to share articles with.

After setting up the sharing of content across portals, we click on the button "Save" or "Save & Close".

After successfully setting up the sharing of articles, the receiving portal will feature the option to select a portal where the articles will be displayed in this instance of the module. A portal can only be selected if we use custom settings (instance).

Receiving of data is allowed in all the satellite modules as well (EasyDNNnews Calendar, EasyDNNnews Tags, EasyDNNnews CategoriesMenu, EasyDNNnews Search).

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com : How to Add JavaScript to DNN Page?

clock Oktober 15, 2015 09:51 by author Kenny

How to Add JavaScript to DNN Page?

What is JavaScript?

JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls and quizzes. JavaScript support is built right into all the major web browsers, including Internet Explorer, Firefox and Safari. Provided that the visitors to your site are using web browsers that support JavaScript (most do) and have JavaScript enabled (it is by default), then your JavaScript will run when they visit the page. JavaScript is an interpreted language, so no special program is required to create usable code. Any plain text editor such as Notepad (one of the Accessories that comes in Windows) is quite satisfactory for being able to write JavaScript. That said, an editor that colorizes the code to make it easier to see what is what makes it easier to find your mistakes.

Step by Step

  1. Navigate to a DNN page where you want to place slideshow
  2. Click on “Edit Page” located at right side of Admin bar and choose “Edit this page”, this will turn page to Edit mode.
  3. Say (you have already setup images) on top of content page, then click Modules menu in Admin bar, then click on “Add new Module”.
  4. Choose HTML Editor Module from the list of modules and drag it below to slide show (location of module not mandatory, but a best practice)
  5. Select settings from “gear” action menu of newly added module and remove value from “Module Title” and uncheck Is Sharable (this will prevent share this content across site) under Advanced Settings then click on “Update”
  6. Select Edit content from “pencil” action menu of new module, this will opens a word like editor.
  7. Choose “Basic Text Box” located in left top corner, this will show plane textbox, type relevant JavaScript code here.
  8. Finally choose “Raw” as Render mode located at bottom of the editor and Click on “Save”. This will attach our Script code with page.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com :: What's New in DotNetNuke 7.4.2?

clock Oktober 8, 2015 12:19 by author Kenny

What is New in DotNetNuke 7.4.2?

The latest version of DotNetNuke is 7.4.2. This version has been released at October 6th 2015. This release is maintenance release, bug fixes and support for incremental updates.

SECURITY ISSUES

This release resolves the following two security issues:

  • 2015-06 (Low) Potential XSS issue when using tabs dialog
  • 2015-07 (Medium) Users are getting registered even though User Registration is set to None

What started out as a relatively small maintenance release has turned into one of their largest maintenance releases ever. They spent a lot of time working to resolve a number of password management and multi-language issues along with a few performance enhancements. In total, they ran well over 5000 manual and automated tests on this release with a 99% pass rate.

MAJOR HIGHLIGHTS

  • Added upgrade support from beta release
  • Fixed issue with lists in custom registration form
  • Fixed issue with ignore words in Italian and French
  • Fixed issue with site export in multi-language site
  • Fixed issue where parameters in return URL were malformed
  • Fixed issue in sitemap for multi-language site
  • Fixed issue where control panel did not render links correctly in SSL offload environments
  • Fixed issue where pages with future start date were inaccessible
  • Fixed multiple password reset issues
  • Fixed issue where site settings could be duplicated
  • Fixed issue where dismissing all notifications removed messages as well
  • Fixed issue where file link for missing file caused exception
  • Fixed issue where localized portal settings were not getting applied when switching languages
  • Fixed issue where admin was unable to change interface language
  • Fixed issue where page name uniqueness was applied cross language
  • Fixed multiple scheduler issues

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com :: How to Create a Backup of DNN and The Database

clock September 23, 2015 07:51 by author Kenny

How to Create a Backup of DNN and The Database

This topic is very important and requires a bit of planning, especially if you do not have direct access to your database server to perform your own backups. In the following sections I will first talk about what you must backup and why some of those items are very important. I will then discuss how to perform a DNN backup and SQL Server backup.  Finally I will discuss options available for third party modules for performing backups for individuals that do not have direct access to their servers.

What to Backup?

Simply put, it is a best practice to backup your entire DotNetNuke directory on the web server as well as a full backup of the database. Some people will say that you can get by with only backing up the "portals" folder, this is not correct! To successfully restore a DotNetNuke installation you must ensure that you have all module .dll and other code files you also must have the same validation and decryption keys.  I have found that the only real method to keep your data safe is to create a backup with all files.  Given the limited file size of the core DNN installation I have not found this to be a hinderance, especially since the additional files that exist in my website are all related to the content available within and is something I must have a backup.

Performing The Backup

Performing a backup of DotNetNuke is a fairly easy two step process. First I will discuss backing up the DNN installation directory, then I will discuss options available for backing up the database.

Backing up The DotNetNuke Directory

You have two options when backing up the DotNetNuke directory. If you have direct access to the server, you can simply right click on the DotNetNuke directory and select "Send To:" -> "Compressed (Zipped) Folder". This applies for most versions of the windows operating system. You will then have a file named dnn441.zip where dnn441 was your directory name. This zip file will contain all needed backup files, you will want to store this in a safe location.

If you do not have direct access to the server and can only access it via FTP you will have an additional step to obtain a zip file for your site. You will want to connect to your FTP site and COPY all files to a temporary location on your local computer. Once all files have been copied you will want to create a zip file including ALL files and folders that were just downloaded.

NOTE: if using a program such as WinZip for zipping, ensure that the "Use Folder Names" option is enabled so that the folder structure is preserved within your zip archive.

Backing up The DotNetNuke Database

To backup the database you must have access to the database server and the file system of the database server. If you are in a hosted environment you will need to rely on your hosting provider to obtain a backup, or you will need to look into a potential third party solution to backup the database from within DotNetNuke. If you have full access to the server please use one of the below sets of instructions to backup your database..

Backing up a Database with SQL Server and Enterprise Manager

Follow the below steps if you wish to create a databse backup file from Enterprise Manager for SQL Server using Enterprise Manager.

  • Navigate to your specific database in Enterprise Manager
  • Right click on the database and select "All Tasks" -> "Backup Database.."
  • Ensure that "Complete" is selected for the backup type
  • Click the "Add" button in the "Destination" section
  • In this section provide a full file path to the desired backup file, typically named databasename.bak where databasename is your database name
  • Click "Ok" to generate your backup, you will receive a success notice upon completion
  • You will now have a full backup file containing all tables and data for your database.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke 7.4.1 Hosting - ASPHostPortal.com :: How to Use the Text DotNetNuke Skin Object

clock Augustus 28, 2015 11:54 by author Kenny

How to Use the Text DotNetNuke Skin Object

DotNetNuke is a web content management system based on Microsoft .NET. The DNN Platform Edition is open source. DNN is designed for multi-tenancy and supports an unlimited number of websites, either as root websites or for portals in a parent-child configuration. The platform's skinning feature separates content from design-related files for easier customization. Skins make it simple to maintain a common look and structure across related sites without advanced programming knowledge. DNN's core functionality can be expanded with modules for common elements, such as those for e-commerce. The software enables parent-child website resource sharing and management using specially-formed symbolic links.

How to Use the Text DotNetNuke Skin Object

What is a Skin Object?

First of all, a skin object is an ASP.Net user control that is used in DNN skins to provide a limited feature.  For example, the search box, menu, login link, copyright statement, and more, are all skin objects.  They allow a skin designer to include dynamic content without having to know how to build the content itself, or knowing any programming.

Other than the previous description, this post will assume that you know how to create and package your own skin.

Text Skin Object

The Text skin object itself is a very useful feature in skinning, as it allows you to include localized text, while not having to create a copy of the skin for each language, or using any other number of workarounds.

For example, if you have static text next to your login skin object that says, “Welcome, “ then you might want to have alternatives for another language, if you plan to support it.

I am going to use that example for the rest of this post.

The Code

There is minimal code needed to implement the Text skin object.  If you’re using an HTML skin, then you would simply need to do the following:

<object id="dnnTEXT-Welcome" codetype="dotnetnuke/server" codebase="TEXT">
    <param name="Text" value="Welcome, " />
    <param name="CssClass" value="NormalBold" />
    <param name="ResourceKey" value="Welcome.Text" />
    <param name="ReplaceTokens" value="False" />
</object>

If you are using a ASCX skin, then you would need two updates.  First, put this line of code into the top section of the source:

<%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/Admin/Skins/Text.ascx" %>

Next, put this code into the appropriate spot of the source in the skin:

<dnn:TEXT runat="server" id="dnnTEXT-Welcome" Text="Welcome, "
CssClass="NormalBold" ResourceKey="Welcome.Text" ReplaceTokens="False" />

Resource Files

Next, you need to make sure your skin has resource files.  In your skin package, you should have a folder namedApp_LocalResources.  This folder will contain the necessary files to tell your skin the appropriate text to use for the skin object when the specific language is asked for during page request life cycle.

If your skin file is named index.ascx or index.html, then your default resource file for English would be namedindex.ascx.resx.  If your additional supported language is French, your filename might be index.fr-FR.ascx.resx.

The English file code would be something like this:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="Welcome.Text">
    <value>Welcome, </value>
  </data>
</root>

The respective code for the French language file might look like this:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="Welcome.Text">
    <value>Accueil, </value>
  </data>
</root>

Text Skin Object Properties Explained

There are a few properties that you’ve seen in the previous examples that you might be wondering about.  Here is an explanation of those properties:

  • Runat – (required, ASCX only) The value must be ‘server’ 
  • Id – (required) This is a unique name for the tag, much like in standard HTML 
  • Text – (optional) This value will be used as the default, should an appropriate resources file for the current language not be found 
  • CssClass – (optional) This value is the name of a CSS class that will be available to the rendered HTML page to stylize the text in the web browser 
  • ResourceKey – (required) This value references the id (name) of the text to retrieve from the resources file 
  • ReplaceTokens – (optional) This true/false value will tell DNN to look for system tokens and replace them with the appropriate text


DotNetNuke Hosting - ASPHostPortal.com :: How to use DnnExceptionFilterAttribute

clock Augustus 11, 2015 06:16 by author Dan

Often when writing DNN Service Framework methods (based on ASP.NET Web API) you find yourself writing the same boiler plate error-handling code.  Figure 1 shows an example of this boiler-plate code.

Figure 1: An example of a Service Framework Action Method

[HttpPost]
public HttpResponseMessage DeleteTask(TaskDTO taskDTO)
{
try
{
using (var context = DataContext.Instance())
{
var repo = context.GetRepository();
var task = repo.GetById(taskDTO.TaskId, ActiveModule.ModuleID);

repo.Delete(task);
var result = new {Result = "success"};
return Request.CreateResponse(HttpStatusCode.OK, result);
}
}
catch (Exception exc)
{
var result = new { Result = exc.Message };
return Request.CreateResponse(HttpStatusCode.InternalServerError, result);
}
}


This is great that we write code with explicit error handling, but it can get repetitive.  Fortunately ASP.NET Web API provides a way to make this a lot easier – to encourage us to use good error-handling practices.  Web API provides an ExceptionFilterAttribute base class.  This attribute can be applied at the class level or at the method level.  If applied at the class level it applies to all action methods. in the class. The ExceptionFilterAttribute base class has one method OnException which is called if there is an unhandled exception in the action method.

In order to provide support for DNN’s localization framework, the Dnn Services Framework includes a subclass of this base class – DnnExceptionFilterAttribute.  This class provides two properties which gives the developer the ability to provide a MessageKey, and a LocalResourceFile.  Each of these has a default – MessageKey defaults to {ControllerName}_{ActionName}.Error where ControllerName is the name of the controller class and ActionName is the name of the action method where the error occurs, and LocalResourceFile defaults to the global Exceptions.resx resource file.

Lets see how our Delete action method will look if we use the DnnExceptionFilterAttribute.

Figure 2: The Delete Action Method modified to use DnnExceptionFilter

[HttpPost]
[DnnExceptionFilter(MessageKey = "DeleteTask.Error")]
public HttpResponseMessage DeleteTask(TaskDTO taskDTO)
{
using (var context = DataContext.Instance())
{
var repo = context.GetRepository();
var task = repo.GetById(taskDTO.TaskId, ActiveModule.ModuleID);

repo.Delete(task);
var result = new {Result = "success"};
return Request.CreateResponse(HttpStatusCode.OK, result);
}
}


This is a lot less work to do – while still retaining excellent error-handling.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



DotNetNuke Hosting - ASPHostPortal.com :: How to Solve Custom profile properties cannot be selected in DotNetNuke 7

clock Junie 25, 2015 06:09 by author Dan

DNN 7 allows customization of the registration form via an easy interface, with intellisense. You just select "Custom" for Registration Form Type in Admin - Site Settings - User Account Settings tab and you can add all the fields you like to your registration form.

At the moment of writing, this doesn't seem to work well with custom registration properties (i.e. fields you have created yourself via the "Profile Settings - Add New Profile Property button below on the same tab). If you try to type a custom property's name on the Registration Fields box, it just won't come up (although it's been reported that properties of datatype "Text" do come up).

In order to make these properties available to your registration form until a fix is applied to this, you can use SSMS (provided that you have access and experience using it) and do the following:

  •     Go to your DNN database
  •     Open the "PortalSettings" table for edit and find the record that has the value "Registration_RegistrationFields" in the "SettingName" field
  •     You'll see that the "SettingValue" field is a comma-delimited list containing the field aliases of the properties that are to be displayed on the custom registration form. Add the aliases of your own fields in the list.
  •     Update the table and go to your DNN installation (as the Host user), and click on Tools - Clear Cache
  •     If everything goes well, you'll see that the "Registration Fields" box now contains your properties too, and they will appear normally on the registration form.

Another way to do this is to use the Host - SQL section on your DNN installation. To see the current profile properties that are displayed on the custom registration form, type this into the Script box and click "Run Script":

SELECT
SettingValue
FROM  {databaseOwner}{objectQualifier}PortalSettings
WHERE
SettingName = 'Registration_RegistrationFields'


In order to add one or more fields at the end of the list, you must run something like this (where 'MyField' is your custom field's alias). Remember the comma and use no spaces.

UPDATE 
{databaseOwner}{objectQualifier}PortalSettings
SET
SettingValue = SettingValue + ',MyField'
WHERE
SettingName = 'Registration_RegistrationFields'


After you run it, go to Tools and click Clear Cache and you will see your fields on the "Registration Fields" box in the Admin - Site Settings - User Account Settings tab.

If you still need more power and customization with your custom registration page, take a look at the Dynamic Registration module from Datasprings - at the moment of writing this, version 5.0 has just been released for DNN 7.x.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $0. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



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


 photo ahp banner aspnet-01_zps87l92lcl.png

Corporate Address (Location)

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

Tag cloud

Sign in