DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting with ASPHostPortal.com :: GetTab Method without DNN Context

clock November 30, 2014 20:22 by author Mark

GetTab Method without DNN Context

As you know, the simple method GetTab(int tabid) was obsolete and has been replaced by GetTab (ByVal TabId As Integer, ByVal PortalId As Integer, ByVal ignoreCache As Boolean). If you want to call the new method, we have to pass the additional parameter “PortalId”.
In common,  the object PortalSettings can be easy to get with DNN context, such as special dnn module & page; however, it may be inaccessible in some sceneries, such as separate aspx page or handler. Then is there any way to get the correct tab info with this new method? Now there is a simple trick to do it with passing into Null.NullInteger as the parameter PortalId. So the coding looks like that:

var tabController = new TabController();
var blogPage = tabController.GetTab(tabID, Null.NullInteger, false);

Deeping into the source code, you will find out that it always tries to get the correct PortalId for this tab/page object:

//if we do not know the PortalId then try to find it in the Portals Dictionary using the TabId
portalId = GetPortalId(tabId, portalId);
//if we have the PortalId then try to get the TabInfo object
tab = GetTabsByPortal(portalId).WithTabId(tabId) ??
        GetTabsByPortal(GetPortalId(tabId, Null.NullInteger)).WithTabId(tabId);

Hope this trick & tip helps if someone has the same issue.

 



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: How to Resolve the Registered Script Control Error in DotNetNuke 7

clock November 28, 2014 05:14 by author Mark

Registered Script Control Error in DotNetNuke 7

If you’ve made the transition from DotNetNuke 6 to DotNetNuke 7 you’ve probably discovered that the AJAX Toolkit controls don’t play nice with DotNetNuke any more.  Fortunately the Telerik AJAX controls have been bundled with DotNetNuke for version 7.  I’ve discovered that converting to the Telerik controls has been beneficial and worth the upgrade.
Still, it can be a pain getting the code right.  One particular error that I ran into today was the Registered Script Control error.  It looks something like this:

"Script control ‘{controlname}’ is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().  Parameter name: scriptControl"

The error results from “stacked” AJAX controls.  Consider the following HTML

<%@ Register TagPrefix=”dnnui” Namespace=”DotNetNuke.Web.UI.WebControls” Assembly=”DotNetNuke.Web” %>
<%@ Register TagPrefix=”DNN” Namespace=”DotNetNuke.UI.WebControls” Assembly=”DotNetNuke.WebControls” %>
   <DNN:DNNTabStrip ID=”tabsProject” runat=”server” TabRenderMode=”All” Visible=”true”>
     <DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabGeneral”>
       <dnnui:DnnAjaxPanel runat=”server” ID=”dapMain”>
         <asp:Label runat=”server” ID=”lblInfo”></asp:Label>
       </dnnui:DnnAjaxPanel>
   </DNN:DNNTab>
     <DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabSecond”>
       <dnnui:DnnAjaxPanel runat=”server” ID=”dapSecond”>
         <asp:Label runat=”server” ID=”lblMessage”></asp:Label>
       </dnnui:DnnAjaxPanel>
   </DNN:DNNTab>
      </DNN:DNNTabStrip>

Let’s say that the second tab (tabSecond) should only appear under certain conditions; a record was created, a particular user is logged, whatever the condition is doesn’t matter, just that the tab should appear at certain times and not appear at other times.
In the code behind the condition block might look like this:

if (condition) then
tabSecond.Visible = False
end if

But this results in the Registered Script Control error.  Modify the condition block this way:

if (condition) then
dapSecond.EnableAJAX = False
tabSecond.Visible = False
end if

This should resolve the error

What was the issue?  I’m glad you asked.
The issue causing the error is that AJAX controls are registered with the AJAX script manager and cannot be unregistered, or moved.  Hiding an AJAX control is equivalent to moving it from the script.  In order to circumvent that we’re disabling AJAX on the control before it has a chance to be rendered and registered with the script manager.



ASPHostPortal.com to Launch New Data Center in Hong Kong

clock November 25, 2014 08:07 by author Ben

ASPHostPortal.com to Start New Data Center in Hong Kong on November 2014

ASPHostPortal is known for credible and loyal hosting solutions. Apart from the reliability in the ASPHostPortal Uptime, which features 99.9 per cent common uptime, ASPHostPortal also provides outstanding data center which displays ASPHostPortal large speed and large overall performance web hosting package deal. Lately, ASPHostPortal.com launch its new Data Center in Hons Kong on November 2014 with space for more than 10.000 physical servers, and allowing customers’ to satisfy their  data residency needs.



The brand new facility will provide consumers and their finish customers with ASPHostPortal.com providers that meet up with in-country info residency needs. It will also complement the existing ASPHostPortal.com Asia (Singapore) Data Center. The Hong Kong Data Center will offer the full variety of ASPHostPortal.com website hosting infrastructure services, which includes bare steel servers, virtual servers, storage and networking.

ASPHostPortal offers the perfect mixture of affordability and dependability. They have an excellent uptime history with numerous months this 12 months boasting a lot more than 99.9% typical uptime. Their hosting bundle displays velocity and efficiency. Their information heart might take significantly from the credit rating for such superb providers. The brand new data center will allow clients to copy or integrate data between Asia Data Center with higher transfer speeds and unmetered bandwidth (at no charge) in between amenities.

“With ASPHostPortal, picking the Data Center area is really a totally free function and alternative to all consumers. The shopper just chooses US, Europe, Asia or Australia. It is straightforward, intuitive and convenient. The choice is totally free, and there will never be any other cost to the person related with this choice,” said Dean Thomas, Manager at ASPHostPortal.com.

Customers that have any questions on the feature and also the choice which is most suitable for his or her functions ought to truly feel totally free to get in touch with ASPHostPortal via their 24/7/365 customer assistance crew. ASPHostPortal may help you select the right choice that will best fit your needs.

To find out more about new data center in Hong Kong, please visit http://asphostportal.com/Hosting-Data-Center-HongKong.

About ASPHostPortal.com
:

ASPHostPortal.com
is a hosting business that greatest support in Windows and ASP.NET-based hosting. Solutions consist of shared web hosting, reseller hosting, and SharePoint hosting, with specialty in ASP.NET, SQL Server, and architecting very scalable solutions. Like a top little to mid-sized company web hosting provider, ASPHostPortal.com attempt to supply essentially the most technologically advanced hosting options obtainable to all customers across the world. Security, reliability, and efficiency are in the core of web hosting operations to make certain every site and/or software hosted is extremely secured and performs at ideal stage.

 



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: How to Programmatically Create Portals in DNN

clock November 24, 2014 06:31 by author Dan

Introduction

DotNetNuke's portal system is one of its most compelling features. DNN Portals can be either Parent or Child. The different is from the url.

Parent Portal (example):

http://www.asphostportal.com
http://dnn.asphostportal.com

Child Portal (example):

http://www.asphostportal.com
http://asphostportal.com/dnn (As we have utilized "/" after area name, its called child portal)

Sometimes we have to create custom modules where we have to programmatically create portals. In this article we will plot how to make a a child portal programmatically. The technique needs few parameters to be passed which will be obliged to make the child portal. All these parameters have some settled reason. The part of individual parameters are unmistakably clarified in this technique.

/// <summary>
/// Creates new child portal
/// </summary>
protected void CreateNewPortal(string strPortalName, string strPassword, string strConfirmPassword,
 string strFirstName, string strLastName, string strUserName,
 string strQuestion, string strAnswer, string strEmail)
{
 
try
{
PortalController.PortalTemplateInfo template = LoadPortalTemplateInfoForSelectedItem();
 
bool blnChild;
string strPortalAlias;
string strChildPath = string.Empty;
var closePopUpStr = string.Empty;
 
var objPortalController = new PortalController();
 
//Set Portal Name
strPortalName = strPortalName.ToLowerInvariant();
strPortalName  = strPortalName.Text.Replace("http://", "");
 
//Validate Portal Name
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
blnChild = true;
strPortalAlias = strPortalName;
}
else
{
blnChild = true;
 
strPortalAlias = blnChild ? strPortalName.Substring(strPortalName.LastIndexOf("/") + 1) : strPortalName;
}
 
string message = String.Empty;
ModuleMessage.ModuleMessageType messageType = ModuleMessage.ModuleMessageType.RedError;
if (!PortalAliasController.ValidateAlias(strPortalAlias, blnChild))
{
message = Localization.GetString("InvalidName", LocalResourceFile);
}
 
//Validate Password
if (strPassword != strConfirmPassword)
{
if (!String.IsNullOrEmpty(message)) message += "<br/>";
message += Localization.GetString("InvalidPassword", LocalResourceFile);
}
string strServerPath = Globals.GetAbsoluteServerPath(Request);
 
//Set Portal Alias for Child Portals
if (String.IsNullOrEmpty(message))
{
if (blnChild)
{
strChildPath = strServerPath + strPortalAlias;
 
if (Directory.Exists(strChildPath))
{
message = Localization.GetString("ChildExists", LocalResourceFile);
}
else
{
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
strPortalAlias = Globals.GetDomainName(Request, true) + "/" + strPortalAlias;
}
else
{
strPortalAlias = strPortalName;
}
}
}
}
 
//Get Home Directory
string homeDir = "";
 
//Validate Home Folder
if (!string.IsNullOrEmpty(homeDir))
{
if (string.IsNullOrEmpty(String.Format("{0}\\{1}\\", Globals.ApplicationMapPath, homeDir).Replace("/", "\\")))
{
message = Localization.GetString("InvalidHomeFolder", LocalResourceFile);
}
if (homeDir.Contains("admin") || homeDir.Contains("DesktopModules") || homeDir.ToLowerInvariant() == "portals/")
{
message = Localization.GetString("InvalidHomeFolder", LocalResourceFile);
}
}
 
//Validate Portal Alias
if (!string.IsNullOrEmpty(strPortalAlias))
{
PortalAliasInfo portalAlias = PortalAliasController.GetPortalAliasLookup(strPortalAlias.ToLower());
if (portalAlias != null)
{
message = Localization.GetString("DuplicatePortalAlias", LocalResourceFile);
}
}
 
//Create Portal
if (String.IsNullOrEmpty(message))
{
//Attempt to create the portal
var objAdminUser = new UserInfo();
int intPortalId;
try
{
                            // These parameters are required to assign admin to the portal
objAdminUser.FirstName = strFirstName;
objAdminUser.LastName = strLastName;
objAdminUser.Username = strUsername;
objAdminUser.DisplayName = strFirstName + " " + strLastName;
objAdminUser.Email = strEmail;
objAdminUser.IsSuperUser = false;
 
objAdminUser.Membership.Approved = true;
objAdminUser.Membership.Password = strPassword;
objAdminUser.Membership.PasswordQuestion = strQuestion;
objAdminUser.Membership.PasswordAnswer = strAnswer;
 
objAdminUser.Profile.FirstName = strFirstName;
objAdminUser.Profile.LastName = strLastName;
 
intPortalId = objPortalController.CreatePortal(tbTitle.Text,
objAdminUser,
tbDescription.Text,
"",
template,
homeDir,
strPortalAlias,
strServerPath,
strChildPath,
blnChild);
 
//Clears the cache
DotNetNuke.Common.Utilities.DataCache.ClearPortalCache(PortalId, false);
}
catch (Exception ex)
{
intPortalId = Null.NullInteger;
message = ex.Message;
}
                        // Sends email on portal creation
SendMailOnPortalCreation(intPortalID, strEmail, strPortalAlias, objAdminUser);
}
 
DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, "", message, messageType);
 
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}

The motivation behind this technique to send email on effective creation of child portal. The sending of email obliges legitimate SMTP settings in the DNN site.

private void SendMailOnPortalCreation(int intPortalID, string strEmail, string strPortalAlias, UserInfo objAdminUser)
{
try
{
if (intPortalId != -1)
{
//Create a Portal Settings object for the new Portal
PortalInfo objPortal = objPortalController.GetPortal(intPortalId);
var newSettings = new PortalSettings { PortalAlias = new PortalAliasInfo { HTTPAlias = strPortalAlias }, PortalId = intPortalId, DefaultLanguage = objPortal.DefaultLanguage };
string webUrl = Globals.AddHTTP(strPortalAlias);
try
{
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
message = Mail.SendMail(PortalSettings.Email,
strEmail,
PortalSettings.Email + ";" + Host.HostEmail,
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser),
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser),
"",
"",
"",
"",
"",
"");
}
else
{
message = Mail.SendMail(Host.HostEmail,
strEmail,
Host.HostEmail,
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser),
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser),
"",
"",
"",
"",
"",
"");
}
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadException(this, exc);
 
closePopUpStr = (PortalSettings.EnablePopUps) ? "onclick=\"return " + UrlUtils.ClosePopUp(true, webUrl, true) + "\"" : "";
message = string.Format(Localization.GetString("UnknownSendMail.Error", LocalResourceFile), webUrl, closePopUpStr);
}
var objEventLog = new EventLogController();
objEventLog.AddLog(objPortalController.GetPortal(intPortalId), PortalSettings, UserId, "", EventLogController.EventLogType.PORTAL_CREATED);
 
//Redirect to this new site
if (message == Null.NullString)
{
 
//webUrl = (PortalSettings.EnablePopUps) ? UrlUtils.ClosePopUp(true, webUrl, false) : webUrl;
Response.Redirect(webUrl, true);
}
else
{
closePopUpStr = (PortalSettings.EnablePopUps) ? "onclick=\"return " + UrlUtils.ClosePopUp(true, webUrl, true) + "\"" : "";
message = string.Format(Localization.GetString("SendMail.Error", LocalResourceFile), message, webUrl, closePopUpStr);
messageType = ModuleMessage.ModuleMessageType.YellowWarning;
}
}
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}

Conclusion:

By utilizing the above procedure simply make the child portals in DNN. Assuredly, this post describes the procedure clearly and and useful for you



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: Developing a Webservice in DotNetNuke 7.3

clock November 21, 2014 05:30 by author Ben

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 7.3 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.

 



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: Allow Non-Admins to do Web Page Management

clock November 19, 2014 07:14 by author Ben

In DotNetNuke 7.3 the artificial distinctions between Normal and Admin webpages was taken out. All Modules confirmed inside the Admin-Menu can now even be placed on any custom webpage and fundamentally everyone could use them. This informative article gives you directions how you can permit Non-Admins to access the DNN Web page Management and workaround some restrictions.

 


Erik Van Ballegoij presently wrote regarding how to offer non admins accessibility to any admin web page. You can just insert the module like any other into a preferred Page. It’s important to give the desired user(s) Edit Permission on that Web page (not only on that module) otherwise they get an “Access Denied” warning.

Essentially which is it. Users can now edit Page options for Web pages they have edit Permissions to but for no other Pages. There are just two limitations:

  1. Drag and fall to reorder Pages only functions for Directors
  2. Incorporate Webpage(s) only operates for Directors


To get these functionality to operate for Non-Administrators adapt the file at ~/DesktopModules/Admin/Tabs/Tabs.ascx.cs. You’d need to comment out a Safety examine PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) three times:\

  1. OnInit: remark out the if-Condition (line ~237) and the else statement (~243-247)
  2. CtlPagesNodeDrop: comment out the if-Condition (very first line)
  3. OnCreatePagesClick: remark out the if-Statement (first two strains)


Which is it. I examined it effectively on DNN 7.3.3.

 

 



DotNetNUke 7.3 Hosting with ASPHostPortal.com :: TIPS Getting rid of spam users

clock November 18, 2014 06:14 by author Mark

Quick tips : Getting rid of spam users

After getting a couple of questions, I'd like to provide options for getting rid of spam users, which is cumbersome via UI, if thousands of registration have been added by a bot.
Unfortunately, it is not as easy as just deleting items from a single table, as user Information is distributed in multiple tables inside the database, therefore we need.
You are in a comfortable situation, if your site is using verified or private registration - in this case all spam users are unauthorized and you simply need to hit "delete unauthorized users" in Admin > User Accounts.
In all other cases, you will need to identify the users to delete from the database and mark as "deleted", in order to use "remove deleted users" (hard-delete) those users from all tables.

ALWAYS START WITH A DATABASE BACKUP!!

If your site only has a host and admin user you would run the following statement inside Host > SQL (check "run as script" in all DNN versions prior to 7.3):
UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin')
If you may identify all users by registration date, e.g. since first of November, you would run
UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users]
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin' or CreatedOnDate < 2014-18-11)

Of course, this will become more difficult, if regular users registered the same time. You may consider creating a role "verifiedUsers" and move all regular users manually into this group. Now the command would look like


UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users]
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin' or CreatedOnDate < 2014-18-11)
   AND UserID NOT IN (SELECT UserID FROM {databaseOwner}[{objectQualifier}vw_UserRoles]
                                    WHERE RoleName Like 'verifiedUsers')


Afterwards you may use "Remove Deleted Users" link in Admin > User Management, to delete all rows.
For DNN Versions prior to DNN 7.3.1, you need to delete user folders manually, which reside nested inside users subfolder of the portal folder. Unfortunately, it is difficult to identify all folders from deleted users, but you may delete all empty folders without subfolder and files inside, as the folder for a still existing user will be re-created, once the user logs in again for the first time. You may use the following command (sing a command line on the server, while being inside the users folder)
for /f "delims=" %i in ('dir /ad /s /b') do @rd "%i"
Finally, you should enter file manager in DNN Admin menu and perform a recursive sync to get rid of all folder entries and folder permissions in the database



DotNetNuke 7.3 Hosting :: How to put PayPal Buy Now buttons in your DotNetNuke Portal

clock November 17, 2014 06:52 by author Dan

DotNetNuke is a web content management system based on Microsoft .NET. The Community Edition is open source. But today, we will not describe more detail about DotNetNuke. We will explain to you the simple trick  to put PayPal Buy Now buttons in your DotNetNuke Portal. This is important for your online store because this button will help your customers to buy your product. Now, please read this simple trick carefully. Here is the step :

Remove the <Form> </Form> tags from your PayPal “Buy Now” code.

Add
onClick=”this.form.action=’https://www.paypal.com/dnn-bin/webscr&#8217;;
this.form.submit();”

to the buy now input button.

Paste what is left into the html module

What it does is change the action for the Form that is already embedded into the DotNetNuke default.aspx page.

Here is an an example:

<input type=”hidden” name=”cmd” value=”_xclick”>
<input type=”hidden” name=”business” value=”[email protected]”>
<input type=”hidden” name=”item_name” value=”Send us some money”>
<input type=”hidden” name=”item_number” value=”Gift”>
<input type=”hidden” name=”amount” value=”100.00″>
<input type=”hidden” name=”no_shipping” value=”2″>
<input type=”hidden” name=”no_note” value=”1″>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”hidden” name=”lc” value=”US”>
<input type=”hidden” name=”bn” value=”PP-BuyNowBF”>
<input type=”image”
onClick=”this.form.action=’https://www.paypal.com/dnn-bin/webscr&#8217;;this.form.submit();”

src=”https://www.paypal.com/en_US/i/btn/x-click-but23.gif&#8221; border=”0″ name=”submit” alt=”Make payments with PayPal – it’s fast, free and secure!”>
<img alt=”” border=”0″ src=”https://www.paypal.com/en_US/i/scr/pixel.gif&#8221; width=”1″ height=”1″>

Finish, Your Paypal Buy Now Button is ready to use.



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: Released DNN 7.3.4

clock November 14, 2014 08:03 by author Mark

I am pleased to announce that DNN Platform 7.3.4 has been released. The 7.3.4 release is a stabilization release. DNN 7.3.4 is a smaller maintenance release than normal and is focused on addressing the most serious platform issues. It is expected that this will be the final platform release prior to DNN 7.4.0 which is expected to be released in January 2015. Once again the community has provided a number of significant fixes for this release. I look forward to increasing this level of participation coming in future releases.
You can find all of the issues resolved in this release in our issue tracker. Download 7.3.4 from the DotNetNuke Downloads page.

Major Highlights

  • Fixed issue where site settings were not updating correctly in multi-language installations
  • Fixed issue where partial site templates were not working correctly with child sites
  • Fixed issue where links created in Telerik RadEditor were not correct
  • Fixed issue where search results might be duplicated
  • Fixed issue where user could not change default value for a profile property
  • Fixed issue where a file uploaded from the web is not visible in the Host File Management
  • Fixed issue where ControlBarController returned invalid JSON
  • Fixed issue where you couldn't add a module in a spanish language site
  • Fixed issue where a clustered index was missing from a search table
  • Fixed issue where uploading an ICO file failed
  • Fixed issue where HTML Editor Permissions were not working correctly
  • Fixed issue where popups were not centered on the screen
  • Fixed issue where popup iframe is not initialized correctly
  • Fixed issue where AUM was not correctly handling 301 redirects
  • Fixed issue where multiple region/country controls in a profile did not work correctly
  • Added ability to save localized lists to resource file
  • Added method to remove all subscriptions from a ContentItem

Security Issues

  • None


DotNetNuke 7.3 Hosting | How to configure SMTP authentication in DotNetNuke(DNN) to send email

clock November 13, 2014 04:36 by author Dan

SMTP Authentication, regularly shortened SMTP AUTH, is an extension of the Simple Mail Transfer Protocol whereby a SMTP customer may log in utilizing a verification system picked among those supported by the SMTP server. The authentication extensionion is required for conformation servers. Today, we will discuss about "How to configure SMTP authentication in DotNetNuke(DNN) to send email". To configure SMTP authentication in DotNetNuke(DNN) to send email, you need to set smtp authentication in DotNetNuke(DNN) site to send email, please follow the instructions below to set it.

>> Login to DNN site as Host User

>> Click 'Host' --> 'Host settings' --> 'Advanced settings'

>> On the page, expand  'SMTP Server Settings'

>> Important! "Host Email" field under "Host Details"-->"Basic setting" section in host settings menu must be modified to the Email address correspond to you SMTP username.



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