DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting - ASPHostPortal.com :: How To Develop Web Service in DNN

clock January 12, 2017 04:49 by author Armend

I have recently been assigned to built a DotNetNuke web service to permit a windows application (or any sort of net client for instance) the flexibility to control DotNetNuke person accounts (create, change roles, delete, retrieve e mail address, and so forth.).

Since I had a tough time locating an accurate code sample or documentation that really applies to DotNetNuke and accessing it without having being earlier logged in to DotNetNuke, it absolutely was difficult to constructed anything at all. I ultimately found out how to do it properly so I hard I would put my attempts to some use and write a blog publish explaining how you can get it done step by stage.

 


That said, let's begin by the fundamentals and just create a publicly available web services that permits anybody to ping the net service and acquire a pong again. For that we are going to use the new DotNetNuke 7 Providers Framework which makes it fairly simple should you know how to utilize it.

In order to create a net support that will work within DotNetNuke 7, you will need to fireplace up Visual Studio and create a class Library project (c# or VB but all illustrations listed here will be in c#).

That done, we will then reference some needed DotNetNuke 7 required libraries (making use of the Add Reference dialog box), here's the list:

DotNetNuke.dll
DotNetNuke.Web.dll
System.Net.Http.dll
System.Net.Http.Formatting.dll
System.Web.Http.dll

Then we also need to reference the System.Web class from the .NET tab of the same dialog box.

Finally, we neet to set the output path of the project to the DotNetNuke bin directory and we are ready to code.

Here is the code, the explanations follow:

using System.Net;
using System.Net.Http;
using System.Web.Http;
using DotNetNuke.Web.Api;
 
namespace MyService
{
    public class PingController : DnnApiController
    {
        [AllowAnonymous]
        [HttpGet]
        public HttpResponseMessage PublicPing()
        {
            return Request.CreateResponse(HttpStatusCode.OK, "Pong!");
        }
    }
 
    public class RouteMapper : IServiceRouteMapper
    {
        public void RegisterRoutes(IMapRoute mapRouteManager)
        {
            mapRouteManager.MapHttpRoute("MyService", "default", "{controller}/{action}", new[]{"MyService"});
        }
    }
}

  1. We merely start with some using statements for our needs as demonstrated previously mentioned
  2. We develop a namespace for our service and no matter what name we use listed here will be part of the url. I utilized MyService just for this instance but use any name which makes perception for your services.
  3. Now we create a public class for our controller. You'll be able to create numerous controllers if you want to and the controller is just a bunch of related actions that make feeling to group with each other. In my genuine project I have a PingController for testing functions, a UsersController for almost any steps that relate to user accounts and so forth. Just utilize a identify that makes feeling because it will even present up in the url. Two things for being careful right here:

    • The identify of one's controller should end using the term Controller but only what will come just before it will show inside the url, so for PingController, only Ping will show in the url route.
    • It should inherit DnnApiController so it'll use the DotNetNuke Providers Framework.
  4. Then we create the actual motion, inside our case, PublicPing. It's just a straightforward technique which return an HttpResponseMessage and may have a handful of characteristics. By default the brand new providers framework will respond only to host consumers and you also must explicitly enable other access rights if necessary, in this case the [AllowAnonymous] helps make this technique (or action if you prefer) obtainable to anyone with out credentials. The next attribute, [HttpGet] can make this action reply to HTTP GET verb, which can be usually used when requesting some date in the web server.
  5. Finally in that action, you insert whatever code you action needs to do, in this case just return the string "Pong!", just remember that you should return an HttpResponseMessage rather than a string or int or other item.

Ok so our controller and motion is done, now we just need to map that to an actual URL and that exactly what the final portion of the earlier code does. In essence this code tells DotNetNuke to map a specific url pattern for the techniques outlined in your course. You can use that code as is simply replacing MyService by no matter what your support title is.

Testing:
That is all there is certainly to it, your services is prepared! To test it, first compile it, then just navigate to http://yourdomain/DesktopModules/MyService/API/Ping/PublicPing and you should see "Pong!" inside your browser like a response.

Passing parameters

Ok, so the basic code above is working but it doesn't do anything useful. Lets add something more useful by creating an action that will give us the email address for a specific user id.

Again, here's the code and the explanations will follow (place the code inside the same namespace as the previous one):

public class UsersController : DnnApiController
    {
        [RequireHost]
        [HttpGet]
        public HttpResponseMessage GetEmail(int userid)
        {
            DotNetNuke.Entities.Users.UserInfo ui;
            ui = DotNetNuke.Entities.Users.UserController.GetUserById(PortalSettings.PortalId, userid);
            return Request.CreateResponse(HttpStatusCode.OK, ui.Email);
        }
    }


Initial we build a UsersController course which will hold all actions related to person accounts, it isn't completely required, you'll be able to have numerous steps within the same controller, nonetheless because this motion is not in any respect connected to our PingController, let'a create a new one more descriptive.

We then create a GetEmail motion (method) which will accept a userid parameter. The [RequireHost] parameter listed here will make it accessible only to host customers, we are going to see afterwards other authentication options.

The code inside the approach alone is fairly significantly self explanatory. The only interesting factor to notice listed here is the fact that because our course inherits DnnApiController, we already have a PortalSettings item obtainable. That is the big benefit of producing use of the DotNetNuke Solutions Framework. You'll have a ModuleInfo object to represent your module (if there is 1 using the identical identify as your support, which can be not essential such on this scenario), a PortalSettings object that signifies the portal at the domain title utilized to accessibility the support (portal alias) and at last a UserInfo item symbolizing the person that accessed the web services.

Testing:

If we now navigate to http://yourdomain/MyService/API/Users/GetEmail?userid=2 you need to receive the email tackle back again from the server unless of course obviously that userid does not exist, ensure that you check having a userid that truly exists for that portal. Should you exactly where not formerly linked having a host account, you then will probably be requested for qualifications.

Limiting access to particular roles

Alright, that actually works however, you need to give host qualifications to anyone needing to make use of your webservice. To avoid which you can change [RequireHost] by [DnnAuthorize(StaticRoles="Administrators")] which can limit access to administrators. Much better however, you nevertheless must provide them with an admin account. So the easy method to give only constrained entry would be to create a brand new role in DotNetNuke only for your internet services and substitute Administrators by that specific function title within the authentication parameter.

Utilizing HttpPost : (reply to a comment down bellow)

To answer Massod comment bellow, it's nearly exactly the same thing however, you have to develop an object to contain the posted information.

Let's make a easy ping that makes use of Submit, very first we need to create an object which will contain the posted info this sort of as:

public class FormMessage
    {
        public string Message { get; set; }
    }

Then we create the service method something like this:

 

public class PingController : DnnApiController
   {
       [AllowAnonymous]
       [HttpPost]
       public HttpResponseMessage PostPing(FormMessage formMessage)
       {
           return Request.CreateResponse(HttpStatusCode.OK, "Pong from POST: message was '" + formMessage.Message + "'.");
       }
   }

note that normally, a post would only return ok and no message, I am just doing this so we can test here.

Now since this is a POST verb, we can't test it by only using url parameters, we need to make an html file with a form to test it out. It would be someting like this:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Pagetitle>
head>
<body>
    <form action="http://dnndev/DesktopModules/MyService/API/Ping/PostPing" method="POST">
        <label for="message">Message: label><input type="text" name="Message"/>
        <input type="submit" value="Submit"/>
    form>
body>
html>

The crucial thing to not right here is you can not just develop your Publish technique taking a string even when this can be only what you require, you do must create an object which will get your parameters.

Also never overlook that this is only for tests, you usually do not need to make this publicly accessible, you'd probably usually use yet another parameter than [AllowAnonymous] such as [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] and [ValidateAntiForgeryToken] unless you truly want that for being public.

 

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.



DotNetNuke Hosting - ASPHostPortal.com :: Tips To Remove .aspx from DNN

clock December 8, 2016 05:05 by author Armend

In this post I will expains how to remove .aspx from DotNetNuke URL, Lets check it out. DotNetNuke ships with a URL supplier that throughout the years has experienced a few overhauls by they way it can deal with URLs

 

Unique Method – Default.aspx?TabId=52

Second Version –/Home/TabId/52/Default.aspx

Human Friendly (Current Default) –/Home.aspx

The new human cordial is extraordinary yet obliges that the client attach the .aspx to the end of the page names.

Contextual analysis

Lets say you have a business card or advancement and you need to promote a particular page on your site that individuals could really sort in

"www.domain.com/promo"

Regularly what you would do is FTP into your DotNetNuke root index, make an organizer called promo and afterward make a default.htm page to divert to www.domain.com/promo.aspx

Reworking the URL

With IIS7 and Url Rewriting you can now add a few lines to your web.config record and handle urls without the .ASPX augmentation. The following is a sample of such a modify principle and you will put this within your hub.

<rewrite>
    <rules>
        <rule name="sanitize aspx">
          <match url="(^.*)" />
          <conditions logicalGrouping="MatchAll">
            <add negate="true" input="{REQUEST_FILENAME}" matchType="IsFile" />
            <add negate="true" input="{REQUEST_FILENAME}" matchType="IsDirectory" />
            <add input="{URL}" pattern="(.*).(.*)" negate="true" />
          </conditions>
          <action url="{R:1}.aspx" type="Rewrite" />
        </rule>
    </rules>
</rewrite>


This code lives up to expectations by first verifying that a document or index with the/promo does not as of now exist. On the off chance that it does then the physical record will overshadow the change guideline. Second it will then take the area url and add the .aspx to the end on the off chance that it doesn't exist. So when you write in/promo in the background it is serving up the page/promo.aspx. This is carried out without diverting or changing the url.

Presently all your URLs in DotNetNuke can be straightforward and considerably all the more beautiful.

Here is an option form in the event that you need to do 301 sidetracks to the page name versus revamping the url.

<rewrite>
    <rules>
        <rule name="sanitize aspx" stopProcessing="true">
          <match url="(^.*)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{URL}" pattern="(.*).(.*)" negate="true" />
          </conditions>
          <action type="Redirect" url="{R:1}.aspx" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

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.



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 :: How to use Google Gmail SMTP in DNN website?

clock November 10, 2016 07:17 by author Armend

How to use Google Gmail SMTP in DNN website?

In this article we will explain how to use Google Gmail SMTP in DNN. If you want to use Gmail SMTP in your DNN website, this can be easily done by specifying the correct port 587 in the SMTP settings. Unfortunately, there is no port number field supplied in the SMTP settings form. So in order to include the port number, you just need to add the smtp.gmail.com:587 in the SMTP settings.
In order to set the SMTP settings, you will need to login as super host account. Note this is a super administrator account so the basic administrator account will not get the access to the host menu. Under the host settings in the advanced settings tab, you will see a section for SMTP settings. You just simply need to use the following settings. Just replace the email and password of your own.


 

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 :: Integrating Active Directory with DNN

clock October 27, 2016 07:35 by author Armend

Microsoft Active Directory (AD) is the leading identity management platform for companies. AD has powerful identity management processes that help you manage your users, groups and resources in a centralised, secure corporate directory. Active Directory integrated with DNN gives you powerful, seamless capabilities to control real-time access to your DNN site directly from Active Directory.

The standard approach for managing users in DNN is to use the native, isolated user store that is maintained within the confines of the DNN application. This is what comes out of the box. But if your employees already use AD accounts to access your company network you might want to avoid having two completely disconnected user directories.
When an employee joins, leaves or changes roles within the organization, their accounts and access to applications must be added, removed or modified. When this does not occur in a timely manner, the organization is exposed to the risk of accidental or intentional behaviors that can lead to security breaches or the disclosure of sensitive information. So you really want to control access to all your company websites with a single login  controlled by Active Directory as the single point of truth for user identity. This allows for the automatic provisioning, updating and deleting of user accounts in your DNN site whenever the user logs in, without the need for administrators to make manual changes in your DNN or Evoq  site.

Concept

Below is a simple illustration showing how DNN Platform can integrate with Active Directory. In this solution we are relying on LDAP (Lightweight Directory Access Protocol) to consume information from Active Directory.

 

  • Active Directory server provides an LDAP protocol that exposes the AD user data store.
  • DNN Platform is hosted on the IIS server that is member of the Active Directory domain.
  • Corporate users (employees) are automatically signed in to the DNN Platform.
  • Clients using Internet connection can still view DNN website as a Guest or a Registered User (if they manually sign in to the DNN).

Advantages

  • Leverage investments in the Active Directory and DNN.
  • One source of authority and group information, which is Active Directory.
  • One password for DNN and Active Directory account means reduced IT workload and increased security. Passwords are not stored in DNN.
  • Self Service Password Reset - when the Active Directory password is expiring, let your users update their own passwords.
  • Centralized audit trail – all sign-in tasks are stored in one place which is Active Directory logs, which simplifies compliance and enables cross-application analysis.
  • Approach leverages Microsoft’s Integrated Windows Authentication to authenticate users to DNN when they are logged in to their office computer. When employees are on the corporate network and signed in with their Windows credentials, they can use Desktop single signon to auto-login (from a PC or Mac) to get one-click access to their web applications. There’s no need for additional usernames or passwords, just like on-premise apps.
  • Increased security and greater peace of mind.

Implementation

All the features mentioned above can be easily implemented in your DNN by the:

  •     Paid “AD-Pro Authentication” module.
  •     Free “Auth: Active Directory” module.

“AD-Pro Authentication” is an option for customers that have more unique needs.

Corporate Users Need AD-Pro

Below are the few benefits that “AD-Pro Authentication” can provide for your users:

  • New Active Directory users can immediately sign into DNN and start work.
  • When employees or contractors leave the company, corresponding Active Directory user accounts will be disabled, “AD-Pro Authentication” will block access for those users to immediately  prevent unauthorized access and data loss.
  • Active Directory profile fields like username, email address, first name, profile picture are pushed to DNN on sign-in process. You can also easily configure which fields needs to be synced, including custom Active Directory profile fields.
  • You can specify which Active Directory groups should be imported into DNN. This is done via “Role Manager” that allows you to create a advanced mappings between AD groups and DNN roles. For example: if AD user belongs to group “Sales” assign him to DNN role “Employee and Sales”.
  • “Role Manager” allows you to define “Authorization group(s)”. Only AD users who belong to one of the “Authorization Group” will be able to login to DNN.
  • "AD-Pro Authentication" supports Integrated Windows Authentication (IWA) also known as Single Sign On (SSO).
  • "AD-Pro Authentication" allows you to configure DNN with multiple platforms and companies, that's because the module can work with multiple Active Directory domains.
  • When a Active Directory user with an expired password tries to sign into DNN, he is prompted to enter the existing password and a new password. Once that user enters a valid new password, user is signed to DNN.
  • The complexity of a new password is defined by the AD security policies where are defined attributes like: password minimum length, whether the password must contain digits or special characters, how often the password expires and how long to prevent reuse of old passwords.

Note: Active Directory user passwords are never saved in DNN. You can be sure that passwords are not stored anywhere outside the Active Directory.

Summary

Integrating your DNN site with Microsoft Active Directory helps you with:

  • Authenticating users
  • Creating and deleting user accounts
  • Storing user accounts and passwords.
  • Calling enterprise directories to look up user identity details.
  • Integrating with identity systems from other platforms or companies.

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 :: How to Hide help icons in DotnetNuke

clock October 10, 2016 21:26 by author Dan

Admit it. Those little questionmark help icons are ugly. Even if you replace the icon image with something more fancy, you still have to display them everywhere, even at the front-end (for example, the Feedback module uses them). And, if you’re developing for more than one language, that creates an awful lot of work for you, since you have to translate all texts that appear as tooltips when you hover over the icons.

There’s an easy way to hide them, though, and it’s site-wide. It will also apply to any third-party modules that use the dnn label control for providing labels for form controls.

Go to controls\labelcontrol.ascx and change the following line:

   <asp:image id="imgHelp"  runat="server" imageurl="~/images/help.gif" enableviewstate="False" />

to
   <asp:image visible="false" id="imgHelp"  runat="server" imageurl="~/images/help.gif" enableviewstate="False" />

That’s right. A visible=”false” attribute and the icons will disappear.

Also, if you notice that the labels are shifted to the left a bit (especially in IE), then go two lines above and change the line:

<span style="width:15px">

to

<span style="width:0px">

Or delete the span tag all together.

You can find a relevant thread on DotNetNuke.com with some more tips and tricks for the labelcontrol.ascx file here.
Have fun!

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 :: Easy Steps to Create CatalookDotnetStore Modules for Ecommerce in DotNetNuke

clock September 14, 2016 00:23 by author Dan

 

DotNetNuke equips developers with some of the most robust and powerful frameworks; crucial for building effectual Web applications desirable for eCommerce in DotNetNuke. Once these prerequisite components, especially the templates for Visual Studio and the framework for source edition are effectively installed, the actual process of development for DotNetNuke (DNN) modules becomes exceedingly fast and repeatable, as well as ready for instant use.

Furthermore, no or very little cost is involved in development of eCommerce in DotNetNuke modules as the templates, express editions and framework of the Visual Studio are commonly available free of cost. All you actually need for your eCommerce in DotNetNuke is Visual Studio, either Express or some other licensed edition; DotNetNuke Starter Kit which is available on the website of DotNetNuke; SQL Server, again either Express or some other licensed edition; and a working installation of DotNetNuke for your eCommerce in DotNetNuke.

Building an Ecommerce in DotNetNuke Module

To start with, you will need to open the DotNetNuke website development copy in your Visual Studio. Then simply add a plain file to your eCommerce in DotNetNuke project by making use of a DotNetNuke Dynamic Module template, which comes fully installed with your DotNetNuke Starter Kit package. Open your web.config file to trace the compilation node. Then simply proceed to add a node titled codeSubDirectories under compilation. Add one more item under the codeSubDirectories by using name of your module entered by you in the last step, in the following format: <add directoryName="ModuleName"/>.

Now, go to the Solution Explorer and proceed by locating the DesktopModules directory. Here, you will find a fresh directory that has been created by Dynamic Module template, below your DesktopModules directory. Rename the directory with the same module name used by you in your previous steps. You must next log-in into the DotNetNuke website, opened previously by you in the Visual Studio, by using the facility of a host account provided for the purpose. Under the main menu of this host account, select the Module Definitions option, and then select the Create New Module option. Now, you will need to fill-up this module form by making use of the same module name used by you in the steps followed earlier.

After that is done, click on the Add Control of the form for Create New Module. From the drop-down list, click select on the file that has been added to it by Dynamic Module template. This file represents module name that was specified in your previous steps; only with the extension:.ascx added to it. You now need to open this.ascx file in the Visual Studio. It will display both a code-behind view and design created by the module template. You can add functionality to this code-behind file as deemed suitable to your eCommerce in DotNetNuke. Visual and layout elements may also be added to your design view, if desired. Before making an attempt to create the module, it is advisable to verify DotNetNuke portal installation functionality.

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 :: Install module extension in DotNetNuke

clock September 1, 2016 18:46 by author Armend

How to Install module extension in DotNetNuke ?

What is actually a module extension in DNN? A module extension can be considered as plugin program that you can install on your site. Just imagine you have a car and you want to add a new sound system to your car, this new sound system can be considered as a plugin module to enhance your car looks and feeling.
To install a module extension in DNN, you will need to use a host account known super user account. Once login on the site, you will have a menu called host. Under this menu, you will find a menu called Extensions. Please click this menu.

A page contains extension modules list will appear.

Click the browse button to select the installation file. The installation file in DNN must in .zip format.

Click the Next button and you will be able to see the details of the extension specification.

If there is a release note, you will be able to see the what updates or changes that have been made.

If there is a license note, you will be able to review it as well. Tick the checkbox and click Next button to accept the license.

The installation will be fully completed if you do not see any warning or red text in the scrolling installation summary process

 

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 ::How To Reset the Passwords for All Users in a DNN Site

clock June 30, 2016 20:01 by author Armend

How To Reset the Passwords for All Users in a DNN Site

Now, before I go any further, it would be an absolute best practice to have and you’d be irresponsible if you didn’t have a formal policy to protect yourself and the clients you’re providing services to.  Have a clear understanding of how you accept sites, how you maintain them, and when you destroy your copies of them.  If you’re in support, I’d suggest destroying your backups as soon as your client confirms that their issue is solved.  The rule of thumb here, don’t keep copies.  Destroy them at your earliest convenience.  That being said, I am not a lawyer either, so you’ll want to review your policies and the laws in your region.

Resetting the Passwords for All Users

The context of this DNN tip is to allow you access to literally impersonate the users on a DNN site.  If the number of users is low, I’d suggest leaving this article now to use my DNN Demo Skin Objects.  Seriously, they’re pretty cool.  You should check them out.
Ideally, it would be convenient if you knew all of the passwords of the users on the site, but we won’t and we shouldn’t.  Instead, we’ll change every password for every user to “password” using the ASPX file below.  All you have to do is create an ASPX file in the root of the site, paste this code into it, and then view it in a web browser of your choice.  From there, it’s a single click to reset all of the passwords to “password.”

WARNING!!!  Never do this on a production site for any reason or put this file on a production server, anywhere.  Also, it should only be used for LEGAL and ETHICAL purposes.
The code below does the meat of the work for you, but you can just download the file by clicking the button below and save yourself some time.  

private int PortalId
    {
        get
        {
            return PortalController.GetCurrentPortalSettings().PortalId;
        }
    }
    protected void ProcessUsers(object sender, EventArgs e)
    {
        try
        {
            IterateThroughUsers();
        }
        catch (Exception ex)
        {
            Exceptions.ProcessModuleLoadException(this, ex, true);
        }
    }
    private void IterateThroughUsers()
    {
        var sb = new StringBuilder();
        var totalRecords = 0;
        sb.Append("
Updating Superusers
");
        var superUsers = UserController.GetUsers(false, true, Null.NullInteger);
        UpdateUserInfo(superUsers, ref sb);
        sb.Append("
Updating Normal Users
");
        var normalUsers = UserController.GetUsers(PortalId, -1, -1, ref totalRecords, true, false);
        UpdateUserInfo(normalUsers, ref sb);
        plcUserLog.Controls.Add(new LiteralControl(sb.ToString()));
    }
    private void UpdateUserInfo(ArrayList users, ref StringBuilder sb)
    {
        foreach (var user in users)
        {
            // convert the user object to UserInfo
            var oUser = (UserInfo)user;

            // update the password
            // REQUIRES: Change the enablePasswordRetrieval attribute to True in the web.config
            // for newer versions of DNN, use this:
            //MembershipProvider.Instance().ResetAndChangePassword(oUser, "password");
            var success = DotNetNuke.Security.Membership.MembershipProvider.Instance().ChangePassword(oUser, string.Empty, "password");
            sb.AppendFormat(
                success
                    ? "
{0} {1} ({2}) updated with a new password.
"
                    : "
{0} {1} ({2}) NOT UPDATED!
", oUser.FirstName, oUser.LastName,
                oUser.Username);
            // save the user
            UserController.UpdateUser(PortalId, oUser, false);
        }
    }

I hope this article helpful for you, happy Coding :)



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.



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