DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting - ASPHostPortal.com :: Writing a New Authentication in DotNetnuke

clock February 2, 2017 05:00 by author Armend

My companion organization already had ADFS setup. My purpose was to have the partner organization authenticate the user after which have DNN automatically recognize the user, not obtaining to enter any far more credentials. From there we wanted to manage the groups and permissions by way of the standard DNN portal.
I was initially beneath the misconception that I couldn't make use of the present DNNMembershipProvider and I'd have to generate a whole new Authentication Provider and gather the credentials and pass them to my partner organization.

What I have figured out is that you can use the existing DNNMembership provider, but you've got to make the user ahead of the request gets towards the DNNMembership provider making use of the info offered by ADFS.

Note: This approach is really a straight pass-through from ADFS to DNN. No measures are taken to authenticate the user or to check any from the inputs from ADFS.

As an aside, this method performs not just with ADFS but in addition any other external 3rd-party Authentication approach that sends user info in headers or cookies. Change the context_AuthenticateRequest approach to suit your requirements.

Right here are the pre-conditions to this article. I expect:

  • Your partner organization has ADFS up and running
  • You have your ADFS proxy up and running and it talks to the partner organization.
  • ADFS Web Agent is installed on the server you are running.

Let’s get begin.

HTTPModule

What you've to complete is produce an HTTPModule that will intercept the AuthorizeRequest events ahead of DNN does. An over-simplified definition of an HTTPModule is, it is a piece of code that runs ahead of any web page gets hit. You can listen for a large amount of distinct events. For much more data, click right here.

To make the HTTPModule you'll need to:

  • Open Visual Studio and produce a brand new class library.
  • Generate a brand new class and copy the code attached to this blog.
  • Add References to the following DLLs
    • DotNetNuke
    • System.Web
    • System.Web.Security.SingleSignOn
    • System.Web.Security.SingleSignOn.ClaimsTransform
    • System.Web.Security.SingleSignOn.Permissions
  • Compile the solution
  • The DLL that is created will need to be placed in the bin directory of your website.
  • Make changes to your web.config (explained in a later section).

I will walk through a bit of the code. Here is the first snippet of code. We start listening for the AuthenticateRequest event. All other events pass through untouched.

public void Init(HttpApplication context)
{
//Start listening for each authentication request
context.AuthenticateRequest += new EventHandler(context_AuthenticateRequest);
}

Now, what do we do when this event is fired off? To shorten the namespace I added the statement

using SSO = System.Web.Security.SingleSignOn;

First off, we need to get the information that ADFS has sent us by casting the User.Identity into the ADFS object SingleSignOnIdentity.

public void context_AuthenticateRequest(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
//By the time the request gets to here, it should have been authenticated
//against ADFS.
SSO.SingleSignOnIdentity id = (SSO.SingleSignOnIdentity)app.User.Identity;

At this point you will have access to the user’s Identity and any claims coming from the ADFS server. You can access them through id.SecurityPropertyCollection. You can use them to populate the new user account. You can iterate through the claims with the following code

foreach(SecurityProperty sp in id.SecurityPropertyCollection)
{
    Console.WriteLine(sp.Name);
    Console.WriteLine(sp.Value);
}

Subsequent, we check to determine in the event the use currently exists within the database by utilizing the DNN API function GetUserByName. If it doesn’t, then the user is created by the common DNN API function CreateUser and logged in. If the user does exist currently then we log them in automatically. The user will automatically be added to the Registered Users and Subscribers security groups.

//'See if user exists in DNN Portal user DB
UserInfo objUserInfo = UserController.GetUserByName(currentPortal.PortalId, id.Name);
//' user does exist - try to create on the fly
if (objUserInfo == null)
{
    objUserInfo = new UserInfo();
    objUserInfo.DisplayName = id.Name;
    objUserInfo.FirstName = id.Name;
    objUserInfo.LastName = id.Name;
    objUserInfo.Username = id.Name;
    objUserInfo.Membership.Password = "AReallyStrongPassword";
    objUserInfo.PortalID = currentPortal.PortalId;
    objUserInfo.Email = id.Name;
    UserCreateStatus objUserCreateStatus = UserController.CreateUser(ref objUserInfo);
    //See if the user was added successfully
    if (objUserCreateStatus == UserCreateStatus.Success)
    {
        //We have created them successfully, so let them into the site
        LetsLogUserIn(objUserInfo);
    }
    else
    {
        //This will send the error to the error log, but the user will experience an infinite loop
        throw new Exception("User not created successfully: " + objUserInfo.Username + "- " +         objUserCreateStatus.ToString());
}

Here is the LetsLogUserIn function:

private void LetsLogUserIn(UserInfo objUserInfo)
{
    try
    {
    //Get the current portal
    PortalSettings currentPortal = PortalController.GetCurrentPortalSettings();
    //set the language to the default language of the portal
    Localization.SetLanguage(currentPortal.DefaultLanguage);
    //Log the user in
        UserController.UserLogin(currentPortal.PortalId,
            objUserInfo,
            currentPortal.PortalName,
            HttpContext.Current.Request.UserHostAddress,
            false);
    }
    catch(Exception ex)
    {
        Exceptions.LogException(ex);
    }
}

Web.Config

We need to make several changes to the web.config. First we need to make the changes necessary for ADFS and then we need to make changes for our HTTPModule.

The ADFS changes are the standard web.config changes you would do for any ADFS claims-aware site. You first need to add the section groups to your web.config.

<sectionGroup name="system.web">
    <section name="websso" type="System.Web.Security.SingleSignOn.WebSsoConfigurationHandler,                                  System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null" />
</sectionGroup>

Then you need to add the actual section. The <returnurl> needs to be EXACTLY what is put into ADFS. Remember, this URL needs to have a / at the end to prevent ADFS from posting to a directory listing. The <fs> element needs to be changed to reflect the name of your server.

<system.web>

    <websso>
        <authenticationrequired />
        <auditlevel>55</auditlevel>
        <urls>
            <returnurl>https://your_application/</returnurl>
        </urls>
        <fs>https://fs-server/adfs/fs/federationserverservice.asmx</fs>
    </websso>

</system.web>

If you would like to have logging (and who doesn’t like loggingJ) you will need to add the following section at the end of your web.config

<configuration>

<system.diagnostics>
     <switches>
       <!-- enables full debug logging -->
       <add name="WebSsoDebugLevel" value="255" />
     </switches>
     <trace autoflush="true" indentsize="3">
       <listeners>
         <!-- either create a c:\logs directory and grant Network Service permission to write to it, or remove this listener -->
         <add name="MyListener"
              type="System.Web.Security.SingleSignOn.BoundedSizeLogFileTraceListener, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null"
              initializeData="c:\logs\webagent.log" />
       </listeners>
     </trace>
   </system.diagnostics>
</configuration>

Ultimately, you need to add the HTTPModules for ADFS and our HTTPModule. Order matters a good deal for the HTTPModules. We require the ADFS Web Agent to become listed first, to ensure that any request will likely be redirected to our partner’s logon screen. Right away following the Web Agent should be our HTTPModule. This will make sure that we'll automatically log them on just before DNN even see it.

<system.web>
<httpModules>
    <add name="Identity Federation Services Application Authentication Module"                       type="System.Web.Security.SingleSignOn.WebSsoAuthenticationModule, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null" />
 
    <add name="HTTP_Module_Test" type="HTTP_Module_Test.SSO_Module, HTTP_Module_Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>

There you have it Hope it helps someone.

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/month only. 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.

Save



DotNetNuke Hosting - ASPHostPortal.com :: How to Create a Page Template in DotNetNuke

clock November 17, 2016 07:32 by author Armend

How to Create a Page Template in DotNetNuke

Creating page templates in DotNetNuke helps to eliminate the tiresome task of creating blank pages and adding modules one-by-one.  This DotNetNuke tutorial covers creating a model page, and saving that page as a template, allowing rapid generation of new pages.

 

I personally like to use Razor scripts to load the content of a page outside of standard HTML.  In other words, I create a template with the scripts already defined.  With all the script definitions in place, I simply create new pages from the template, and the only thing I need to add is the static HTML for that specific page.  This approach will also work with static content as well as other scripting methods. 

You need to arrange the proper DNN modules on your model page then fill in the modules with your selected content.  When you export the template, but sure to check the box to include content in your template.

The process is simple.  Once the template page is created, be sure you are logged in to the site.   Hover your mouse pointer over “Pages” in the top menu.  In the pop-up menu, select “Export “.
You will be directed to the “Export” screen where you will:

  1. Select the folder where you would like to save the template.   DNN includes a default template directory which is recommended.
  2. Type a name for the template.
  3. Type a description for the template.
  4. If you have scripts, or static content, which you will want displayed on the template pages, select the “Include Content” checkbox.

Once you save this template, you may choose to use the template when adding new DNN pages.

Best Recommended DotNetNuke Hosting

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.



DotNetNuke Hosting - ASPHostPortal.com :: Tips Responsive Bootstrap skin for DNN

clock September 15, 2016 20:13 by author Armend

Bootstrap is a free collection of tools for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions.

Twitter's Bootstrap is an excellent set of carefully crafted user interface elements, layouts, and javascript tools, freely available to use in your next web design project. This video series aims to introduce you to Bootstrap; taking you all the way from downloading the resources, to building a complete Bootstrap-based website.

While in the process of developing our own Responsive Twitter Bootstrap Skin for DotNetNuke , we had to jump over a couple of hurdles. First we had to figure out how to implement a dropdown on hover menu. Secondly, we had to overcome the Bootstrap issue where once you are on a child page, you cannot navigate back to the parent page in the menu. Bootstrap is against both of these features, however we feel as though these features provide a user friendly interface, especially while using a tablet or smartphone. With that said, we wrote this article to save you the headache to incorporate these two features in your Responsive Twitter Bootstrap Skin for DotNetNuke .

 

The real beauty was that I realized, I had included both the data-toggle="dropdown" and the data-hover="dropdown". You must only use the data-hover="dropdown" to fix both issues! The correct code is below:

Now you will have dropdown on hover menu items AND will be able to navigate to the parent page from the child page.

Best Recommended DotNetNuke Hosting

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability



DotNetNuke - ASPHostPortal.com :: Tips To Add jQuery To your DotNetNuke Skin

clock June 23, 2016 20:30 by author Armend

Tips To Add jQuery To your DotNetNuke Skin

At this point you’ll be hard pressed to find a site that does not use jQuery. It has become a requirement for many to bring flash like experience in the form of photo sliders or fast responding ajax applications.
Over that time adding jQuery to DotNetNuke (DNN) has not always been straight forward. DNN ships jQuery as part of the core framework and you might assume that it’s always available. But one of the most widely unknown issues is that it must be requested on every page in order for it to be available.

 

Common Symptoms:

  • Main menu does not show sub items.
  • Homepage slider does not rotate.
  • Layout is malformed.
  • Works fine when logged in but not when logged out.

When you login as an administrator jQuery will always be available since the control panel bar request it. However if you logout on that same page it might not have been requested by any module or skin object on that page.

Not Recommended Ways To Add jQuery

  • Do Not: Add script tag into page settings or in your skin file.
  • Why? This will potentially add multiple jQuery reference to your page. The real issue is if any plugins are registered between the first reference and the second reference they won’t be available after the second reference is instantiated.

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Recommended Way To Add jQuery

In your skin file you you can reference and add the control for jQuery. This will ensure that jQuery is available on every single page and that it will only be referenced one time. You also get the benefit of the Client Dependency Framework (CDF).

<%@ Register TagPrefix="dnn" TagName="jQuery" src="~/Admin/Skins/jQuery.ascx" %>
<dnn:jQuery runat="server"></dnn:jQuery>

You can optionally add public properties to register jQuery UI, DNN jQuery Plugins and Hover Intent.

<dnn:jQuery runat="server" jQueryUI="true" DnnjQueryPlugins="true" jQueryHoverIntent="true"></dnn:jQuery>

Note: The search skin object will also register jQuery.



DotNetNUke - ASPHostPortal.com :: How To Create An Announcement With A Slider

clock June 8, 2016 20:57 by author Armend

DotNetNuke has come a long way recently with making things much more w3 compliant. This has allowed for more than just cleaner code; it has also allowed for much more control of your website through jQuery and CSS. Also, according to the forums, it looks like things are getting even better for compliance and control. In this tutorial, we will tell you how to create an announcement with a slider in DotNetNuke.

 

One of our favorite updates of DNN modules to this new compliance, is the DNN Announcements module. With the latest release, we now have the ability to set up the announcements as a list and apply some cool jQuery to it. We decided that we wanted to have the main image fade in and out and the title and description to slide in from the bottom. We came across the s3Slider jQuery plugin which seemed to provide exactly what I was looking for. We have outlined the steps below on how to add it to your DotNetNuke site.

The HTML

  • Add the Announcements module to your page.
  • Click the “Settings” link.
  • Expand the “Announcements Settings”
  • Remove exisiting code from Header Template, Item Template, and Footer Template.
  • In the “Header Template:” text area, enter the following code:

<div id="s3slider">
<ul id="s3sliderContent">

  • In the “Item Template:” text area, enter the following code:

If you want your description area to be at the top of the image area, use the class top in the span.
If you want your description area to be at the bottom of the image area, use the class bottom in the span as I have here.

<li class="s3sliderImage">
[IMAGESOURCE]<span class="bottom"><strong>[TITLE][EDIT]</strong><br />
[DESCRIPTION]<br />
[READMORE]</span>
</li>

  • In the “Footer Template:” text area, enter the following code:

<li class="clear s3sliderImage"></li>

  • Also, in the “Footer Template” area close out the ul and div that was started in the “Header Template” area

The CSS

In your skin.css file, insert the following styles: (note the widths and heights in the CSS. They need to be exactly the same as the image for the announcemnts.)

#s3slider { width: 500px; height: 242px; position: relative; overflow: hidden;}
#s3sliderContent { width: 500px; position: absolute; top: 0; margin-left: 0;}
.s3sliderImage { float: left; position: relative; display: none;}
.s3sliderImage span { position: absolute; font: 14px/21px Arial, Helvetica, sans-serif; padding: 10px 13px;  width: 500px; background-color: #000; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; color: #fff; display: none;}
.top { top: 0; left: 0;}
.bottom { bottom: 0; left: 0;}

The jQuery

Now that we have all of that in place, we can add the jQuery to make it work.

  • Include a refrence to jQuery in your skin. This is already done if widgets are inabled on your site.
  • Download the files from the s3Slider site. http://www.serie3.info/s3slider (link opens in new window)
  • Upload the s3Slider.js file to your skin folder.
  • In your skin file (for example: skin.ascx), enter the following code: (you can put this at the top or the bottom of your skin)

<script type="text/javascript" src="<%= SkinPath%>s3Slider.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
       $('#s3slider').s3Slider({
          timeOut: 7000
       });
    });
</script>

  • Now just start adding the content of your announcements! Be sure to make your images the same size as what is set in the CSS.

DotNetNuke Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com is Perfect, they have a suitable hosting plan for a starter in DotNetNuke Hosting. ASPHostPortal is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

 



DotNetNuke - ASPhostPortal.com :: How To Create A Web farm For Your DotNetNuke Website

clock June 3, 2016 20:40 by author Armend

How To Create A Web farm For Your DotNetNuke Website

With a little luck and a lot of hard work there will come a time when your website’s popularity outgrows the capabilities of a single server. It’s time then to consider moving to a server-cluster also called web farm where you can host your website over multiple servers, balancing and shifting the load all across them so that your visitors continue getting the fast website experience that they’re used to.

Server clustering is now a part of Windows Server and IIS 7, so you can easily set up your web farm and get a dramatic boost in your website’s performance by setting up shared configuration for your website with 2 or more servers.
By using a server farm you can also avoid buying newer and costlier hardware, putting older servers to work to share the load at a lower cost. Additionally a web farm also enhances the security by creating redundancy which will keep the website online and functioning even if one of the server fails.
In this article we will learn how to set up your web server farm through IIS 7 Shared configuration feature for your DotNetNuke website.

 

Requirements for a DotNetNuke Web Farm

Setting up a web farm for DotNetNuke requires a setup in which there are at least two servers to handle the client requests. The servers access the files from a separate file server and the database from a special database server.  The requests are routed to the servers by a special load balancer which makes sure that the requests are evenly divided between the servers.

If your application does not have major file writing operations you can also store the files locally on the two servers and remove the file server from the configuration. This server setup uses file replication to store the files across all front-end servers and any file change on one of the servers is replicated across all servers. This scheme is not suitable if your servers need a lot of file updates and changes because of the extra load that will impose.
Setting this up on IIS7 has become easier than ever thanks to the new Shared configuration feature of IIS7 which allows you to place a common configuration file that will automatically configure all the front-end server you possess.

There are two stages to setting up a web farm for DotNetNuke. You have to configure DotNetNuke to work with a web farm and you have to configure a web farm environment At the server level.
Let’s discuss the configuration of DotNetNuke first. We’ll learn how to configure IIS7 shared configuration a little while later.

Setting up DotNetNuke for Web farm

Modifying the Web.config File to Enable Web Farm Support for DotNetNuke
DotNetNuke uses the web.config to store application settings that decide how it will work. To enable the support for web-farms you have to tell DotNetNuke that it’s in a farm environment. To do this you need to enable web farm support in the Config file.

  • Create Common Machine Keys : DotNetNuke requires that the machine keys of all the frontend servers in the web farm be identical. You can choose the machine keys of any server and must copy it across the servers. The machine two keys to replicate are ‘MachineValidationKey’, and ‘MachineDecryptionKey’.

  The Keys are in configuration->appsettings section of the web.config file.

  • Enable Web Farm : Check that the EnableWebFarmSupport setting is set to ‘True’ in the Configuration->AppSettings section of the configuration file. If this setting does not exist then add it.

  • Add Support for DB Logging Provider : In a farm environment the logs must be kept in a database. You need to setup DotNetNuke to keep the logs in a database. To do this make sure that the value of the defaultProvider node in configuration->dotnetnuke->logging node is set to ‘DBLoggingProvider’.
  • Setting up the Scheduler : DotNetNuke’s scheduler which looks after the regular maintenance tasks needed to keep the website running popularly must also be configured according to the needs of the web farm. Some of the tasks must be run on each machine, while others must be run on specific ones. You’ll need to change the schedule manually.

To change the task schedule first log in as the Super User and go to the Schedule option of the Host menu. Clicking on the button ‘Run on Servers’ will bring a text-box where you can fill the server name where you want each task to run.

The tasks that you may need to modify include : DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DotNetNuke.Services.Log.Eventlog.SendLogNotifications, DotNetNuke.Services.Search.SearchEngineScheduler, DotNetNuke.Modules.Admin.ResourceInstaller.InstallResources, and DotNetNuke.Services.FileSystem.SynchronizeFilesSystem.

You’ll also need to enable the task DotNetuke.Services.Cache.PurgeCache. Make sure this task is enabled and updated.

  • Enable File Based Caching : DotNetNuke does not support database based caching in a web farm scenario. To optimize the caching performance the caching should be file based only. Make sure the node configuration->dotnetnuke->caching has the value ‘FileBasedCachingProvider’ for the attribute ‘defaultProvider’.

Configuring IIS 7 To Work With Your Web farm

Before IIS7 setting up a web farm on IIS was a non-trivial affair because IIS offered no automated replication and configuration across all servers. From IIS7 you can create a standard configuration on one server and replicate it across all servers by sharing only some configuration files. This makes it much more easier to create a web farm for your websites.

First configure your web server as usual to host the website, and when you’ve set up everything use the ‘Shared Configuration’ facility of IIS to export the server configuration files. The files should be exported to a UNC Share location which will be accessed by all the servers in the web farm for the configuration settings.
You will have to similarly enable shared configuration across all your servers and point to the same location where you have the original configuration settings saved. All the servers will copy those configuration settings.

You can easily setup the file server using the following command on the command prompt of the server which you want to use as the file server. Otherwise you can also use the windows graphical interface to set the necessary user permissions for the shared area.

md %SystemDrive%\serverconfig
net share serverconfig $=%SystemDrive%\serverconfig /grant:Users,Change

Note that we are also granting the users the right to modify the shared  contents.

The UNC share will also act as a file shared server, and the servers will grab the files from the share to serve to the client requests. Make sure that you set the file server location as the Home directory of the web server to enable this. A file share is essential to a DotNetNuke web farm.

This concludes the tutorial to establish a Web farm for your DotNetNuke website. If you have made the configuration changes to both DotNetNuke and IIS then your web farm environment should be up and running.



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

clock October 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 October 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 October 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 October 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.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


Corporate Address (Location)

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

Tag cloud

Sign in