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 Fix DotNetNuke "Value Cannot Be Null" Error

clock Junie 4, 2015 06:20 by author Dan

If you have performed an upgrade to your DNN installation and received the following error after the upgrade had completed with a successful report then this article may help you in correcting this error.

Value cannot be null.
Parameter name: type
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

You maybe able to correct this error by following these steps.

1) Log into your control panel.

2) Select the option "Domains" from the Main Menu. Select your domain from the list of Hosted Domains on your account.

3) You should now be at the Domain Menu for the selected Hosted Domain. Locate the option for "File Manager" and click on it. This will show you a Browser window with all of your domain's folders. Click on the "wwwroot" folder to view it's contents and then click on the "Bin" folder to view inside of it.

4) Locate the file named "DotNetNuke.Provider.Membership.SqlDataProvider.dll" within the Bin folder and delete it.

5) Try launching your site again at this time and see if this has corrected the issue. If it did not correct the issue, you must call technical support staff from your hosting provider.

Best DotNetNuke Hosting Recommendation

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



DotNetNuke Hosting - ASPHostPortal.com :: How to Generate A Single Package for Skin and Container

clock Januarie 27, 2015 06:45 by author Ben

When I visited the download web page to produce positive downloads are functioning fine, I noticed that skin package is getting far more downloads than container package's download. That is why this query comes to my head.



The idea behind producing a single package is always to make sure newbies may also set up the package appropriately, and after they evaluate the skin. So, I've decided to add two things:

  1. Develop single package for skin and containers.
  2. Generate a web page template (or could be portal template not positive) that may be employed to view the demo.


So, appropriate now I am going to talk about about how I've produced a single package for skin and container. and you have to wait for next post to know how to generate page template that could demonstrate the skin.

Just before starting to manually do the following measures, I've tried discovering if there's an automated method to do this, and currently created a question in dnn skinning forum. Following are manual steps to merge two different skin and container packages to single 1.

  1. Create separate packages for skin and containers using Create Package Wizard.
  2. Copy the packages from dnn's Install folder to a new folder.
  3. Create a New folder called Package and paste all files of skins and containers to a package folder.
  4. Make sure you don't have common name for any file in skin/container's package. Otherwise step 3 will overwrite it.
  5. Open container's .dnn file and copy following section:
    <package name="Multiflex5.4" type="Container" version="0.0.4">
    ...
    </package>
  6. Open .dnn file for skin and paste the it before </packages> tag.
  7. Remove .dnn file for container
  8. Press Cnrl + A to select all files, right click > Send To > Compressed (Zipped) folder
  9. Rename the newly created Zip file to your desired name.
  10. Test it by installing it to new instance of DNN (or change the skin and container names to install it to the existing installation)

Hope this will be helpfull

Best Recommended DotNetNuke Hosting

ASPHostPortal.com
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 :: Bug Custom profile properties cannot be selected for custom registration form (DNN 7)

clock Januarie 22, 2015 06:59 by author Dan

DNN 7 permits customization of the enlistment structure through a simple interface, with intellisense. You simply select "Custom" for Registration Form Type in Admin - Site Settings - User Account Settings tab and you can include all the fields you like to your enlistment structure.

Site Settings

Right now of composing, this doesn't appear to function admirably with custom enlistment properties (i.e. fields you have made yourself through the "Profile Settings - Add New Profile Property catch underneath on the same tab). On the off chance that you attempt to sort a custom property's name on the Registration Fields box, it simply won't come up (despite the fact that its been accounted for that properties of datatype "Content" do come up).

With a specific end goal to make these properties accessible to your enrollment structure until a fix is connected to this, you can utilize SSMS (gave that you have entry and experience utilizing it) and do the accompanying:

  • Go to your DNN database

  • Open the "Portalsettings" table for alter and discover the record that has the worth "Registration_registrationfields" in the "Settingname" field

  • You'll see that the "Settingvalue" field is a comma-delimited rundown containing the field monikers of the properties that are to be shown on the custom enlistment structure. Include the nom de plumes you could call your own fields in the rundown.

  • Redesign the table and go to your DNN establishment (as the Host client), and click on Tools - Clear Cache

  • In the event that everything goes well, you'll see that the "Enrollment Fields" box now contains your properties as well, and they will seem regularly on the enlistment structure.

An alternate approach to do this is to utilize the Host - SQL segment on your DNN establishment. To see the current profile properties that are shown on the custom enrollment structure, sort this into the Script box and click "Run Script":

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

With a specific end goal to include one or more fields toward the end of the rundown, you must run something like this (where "Myfield" is your custom field's assumed name). Keep in mind the comma and utilize no spaces.

UPDATE

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

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

On the off chance that despite everything you require more power and customization with your custom enlistment page, take a gander at the Dynamic Registration module from Datasprings - right now of composing this, form 5.0 has quite recently been discharged for DNN 7.x.

Standard disclaimer: When you do stuff like the above on your database, you do it at your own danger, and I have no obligation if you harm your database, your machine, or the universe. Continuously have a reinforcement helpful!

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com

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 :: Managing 'Couldn't load type "Dotnetnuke.common.global"

clock Januarie 15, 2015 06:50 by author Dan

Introduction

Today we will show you about Managing 'Couldn't load type "Dotnetnuke.common.global".There are a thousand reasons this feared message can show up, yet suppose it is possible that it shows up on a site that you are 100% certain no one has messed with in any capacity other than transferring documents for a long while.

The problem

The error itself is as follows:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'DotNetNuke.Common.Global'.

Source Error:

Line 1:  <%@ Application Inherits="DotNetNuke.Common.Global" Language="VB" %>
Source File: /global.asax    Line: 1

The setting

That was precisely the case I confronted today when a customer called me and reported the lapse. The customer was totally certain that no progressions had been performed other than transferring a few records, both to the application and the server itself (no redesigns, no apppool changes, no iis design changes). Just to be protected, I checked the dates of the records in the container envelope and additionally the date of the global.asax record and all had not been changed amid the recent months.

Conceivable reasons

Seeking the Web, I was panicked to see that there were in any event a couple of dozen conceivable reasons for this lapse. Case in point, there's a multi-page string in the Dotnetnuke discussions dicussing this blunder. Unfortunately, the greater part of the cases respected moves up to the center stage, recompiling or other stuff that had been changed.

So what else could not be right? All things considered, I again found than when something appears incomprehensible, it doesn't generally must be some amazingly confounded specialized issue.

Solution

The customer had admittance to the full site root by means of a FTP client. After attempting to transfer stuff, the customer coincidentally moved the App_data organizer inside an alternate envelope. That was it! I moved the App_data organizer once more to the root and everything was fine once more.

What I realized from this occurrence: Always search for the least difficult conceivable reason for a blunder first. Trust it bails some of you out there.

Best Recommendation for DotNetNuke Hosting

ASPHostPortal.com is The Leader of Best DotNetNuke Hosting Provider. They provide DotNetNuke Hosting with Affordable Price, Fast & Stable Network, and Structured Recovery System. They start their hosting plan from $1/month. With that price, your data will be safe and always properly backed up. Moreover, they also provide uptime and 30 days money back guarantees for all hosting plan. They have 5 different data centers in the world that can give best support for your DotNetNuke site. With their complete features and cheap price, your DotNetNuke site will be turn into great performance.



DotNetNuke Hosting - ASPHostPortal.com :: Using Master Pages and ASPX Pages in DNN

clock Januarie 9, 2015 11:06 by author Ben

In this post, we are going to see how we can add new aspx pages in DotNetNuke by re-using the existing skin designs to implement some helpfull programming in it.

Why?

If you are running a multi-portal dnn website and want to build some common pages to share between those portals, there are couple of quick ways to do that.

  • Create a new tab in portal 0 and then share link in all other portals.
  • This technique works fine when you want to show "how to" page or help page, static contents or offers related pages. You don't need any custom coding for this and it will be a matter of adding a text html module and paste the html that you designed!
  • Create a new aspx page and share link in all other portals. Well, this one also looks similar to first option but let's think about this: If you are running a multi-portal dnn site and want to show latest offers from all the portals into a page based on user's country, and users having at least 5 orders in history. Now, this will involve some quick coding to do. So, basically, if you want to show content based on some dynamic parameters like user or portal data or similar data, it will be good to create an aspx page.

There is another option! obviously you can create a new module to do this, but remember that we are not doing anything that depends on moduleId or tabId but depends on UserId or PortalId, so I believe it's a quick way to create a new page in place of building an entire dnn module.

How?

  • Create a new theme
    Create a new theme with the name of your skin and paste your skin's css and images into it.
  • Create a new master page
    Create a new master page and paste your skin's ascx control's entire markup over there. Replace all your content pane (i.e. div or tds with runat=server) with CotentPlace holder
  • Create a new page
    • Add a new aspx page called Default2.aspx and select the new master page when creating it.
    • Go to .aspx.vb file and make your parial page class inherit from DotNetNuke.Framework.PageBase in place of System.Web.UI.Page 
    • And that's it you are ready to go!

Conclusion

It is really easy to add a new aspx page in dnn that is re-using skin and you will be able to access all the information like PortalSettings, UserInfo etc. Things like Tab and Module will not be there and it's obvious! This post doesn't say you should create a new aspx page in some cases or not, but demonstrates how to do it if you want. If you have some good examples WHEN we can use it or some good examples WHEN we should NOT use it, I welcome them!

This example will probably work with dnn 4.x, 5.x, 7.x, though I've used this in dnn 5.2.0 and 7.3.4.

 



DotNetNuke Hosting with ASPHostPortal.com :: Customizing DNN 7 Search and Search Results

clock Januarie 6, 2015 05:38 by author Ben

DNN 7 has introduced a brand new, Lucene-powered indexing and search results retrieval mechanism. This implies that all strategies you knew are not in impact any more. No much more SQL queries and/or tables, information get returned in JSON format and rendered via Javascript.

This adds a whole lot of new functionality but additionally a great deal of limitations inside the way Search Benefits are presented. Actually, there in no way was a simple method to customize Search Outcomes, but until now you might just edit SearchResults.ascx and its corresponding code-behind file and have your preferred result.

 


Things are still ugly regarding customization. The default Search Results layout includes a hyperlink guiding you to sophisticated search concepts, an "Advanced" type that asks you to provide a variety of information like exactly where you want to search (categorized by module variety) and so forth.

This does not constantly make sense to finish customers, and some components need to be removed in certain scenarios. Customers don't always want advanced search possibilities, nor do they ought to know what type of modules your website includes. In some instances they do not give a damn regarding the author, or the last modified date too. But there is no immediate approach to configure what is going to be displayed and what is going to be not.

Additionally, till now you might face the issue of default module titles (which customers normally leave as is since they're making use of containers that didn't incorporate the module title) by tweaking the way module titles have been inserted in the SearchItem table (see this older post for a lot more). Because no SQL tables are employed any more, you happen to be left with ugly "Text/HTML" and other default titles in Search Outcomes. The JSON returned for each and every search result item just consists of a title that's typically created of a concatenation from the tab's name as well as the module's title (or, inside the case of grouped outcomes, just the module's title).

Furthermore, getting a module having a BLANK title is no longer an selection considering that modules with blank titles will not be indexed(!).

So le't see how we are able to address all of the above with some modifications on particular files. Be warned that what I am saying here applies to version 7.1 and might or could not be in effect for future DNN versions, at the same time as that those adjustments are not upgrade-proof, which means that should you upgrade your website to a greater DNN version you might shed them. But, it is far better than absolutely nothing. :)

Make sure to get a backup of each of the files you're going to modify in case some thing goes incorrect!

Let's start.

Hiding the "advanced" link
File: dnn.SearchResult.js
Location: DesktopModules\Admin\SearchResults

Go to line 343, you will see a call to the DnnSearchBox like the following

 dnn.searchResult.searchInput = $('#dnnSearchResult_dnnSearchBox').dnnSearchBox({
           id: 'dnnSearchResult_dnnSearchBox',
           filterText: dnn.searchResult.defaultSettings.advancedText,
           showAdvanced: true,
           advancedId: 'dnnSearchResultAdvancedForm',

Locate this line:

showAdvanced: true,

And change it to

showAdvanced: false,

This is an option that you can't access via the module settings and it hides the "advanced" link. Unfortunately, the form that would pop up will still be visible at the bottom of the page so you have to take an extra step:

File: SearchResults.ascx
Location: DesktopModules\Admin\SearchResults

Go to around line 55 and you'll see a DIV element surrounding the elements of the Advanced form, like the following:

    <div id="dnnSearchResultAdvancedForm" class="dnnForm">
        <div class="dnnFormItem">
            <dnn:Label ID="lblAdvancedTags" runat="server" ResourceKey="lblAdvancedTags" />
            <input type="text" id="advancedTagsCtrl" />
        </div>
        <div class="dnnFormItem">

    ...

Add a style="display:none;" attribute to the outer div to hide the whole form.

If you need the advanced form but do not need to show specific controls, you can just skip the steps above, go at this point and just add a style="display:none;" attribute to any of the DIVs nested inside to hide the specific control you don't need (e.g. Scope)

Hide Advanced Tips link

File: dnn.SearchResult.js
Location: DesktopModules\Admin\SearchResults

Go to line 359 (it's empty), just above this piece of code:

$('a.dnnSearchResultAdvancedTip').on('click', function () {
            $('#dnnSearchResult-advancedTipContainer').slideToggle('fast');
            return false;
        });

And insert the following line:

$('a.dnnSearchResultAdvancedTip').hide();

Alternatively, you can achieve the same result by adding a style="display:none;" attribute at the A tag in SearchResults.ascx, line 6:

<a href="javascript:void(0)" class="dnnSearchResultAdvancedTip"><%= LinkAdvancedTipText %></a>

Hide Results by Page / Sort section

File: SearchResults.ascx
Location: DesktopModules\Admin\SearchResults

Go to line 13 and add a style="display:none;" attribute to the outer DIV element there (first element in code snippet below):

<div class="dnnSearchResultPanel">
    <div class="dnnRight">
        <ul class="dnnSearchResultSortOptions">
            <li class="active"><a href="#byRelevance"><%= RelevanceText %></a></li>
            <li><a href="#byDate"><%= DateText %></a></li>...

If you hide this section but you need to specify a different sort order and/or results per page setting, you can alter the Javascript call at the same file, line 116 onwards, by altering the sortOption and pageSize initial values:

$(function () {
        if(typeof dnn != 'undefined' && dnn.searchResult){
            dnn.searchResult.moduleId = <%= ModuleId %>;
            dnn.searchResult.queryOptions = {
                searchTerm: '<%= SearchTerm %>',
                sortOption: 0,
                pageIndex: 1,
                pageSize: 15
            };

sortOption can be 0 for date, 1 for relevance.
pageSize can be anything you need.

Hide various elements on Search Results

Well, some people don't like the "last updated" information. Others don't like the "author" info. So let's see how we get rid of anything we don't need:

File: dnn.SearchResult.js
Location: DesktopModules\Admin\SearchResults

Start from about line 112,where you'll see code like this:

    markup += '<div class="dnnSearchResultItem-Others">';
            markup += '<span>' + dnn.searchResult.defaultSettings.lastModifiedText + ' </span>';
            markup += data.DisplayModifiedTime;
            markup += '</div>';

            markup += '<div class="dnnSearchResultItem-Others">';
            markup += '<span>' + dnn.searchResult.defaultSettings.sourceText + ' </span>';

Comment lines 112 to 115 to get rid of the "last updated" text
Comment lines 117 to 119 to get rid of the "source" text and link
Comment lines 121 to 123 to get rid of author info
Comment lines 126 to 135 to get rid of 'tags" info

Hide default HTML module titles (if any)

As mentioned earlier, you may not want module titles to appear in search results, but they do, even if your container doesn't display the module's title. The most common is "Text/HTML" and we'll see how to get rid of it in Search Results.

File: dnn.SearchResult.js
Location: DesktopModules\Admin\SearchResults

Scroll down to the bottom of the file and append this function at the end:

function fixTitle (s) {
  
    if (s=='Text/HTML') {
        return ('...');
    }
  
    var s1;
    var s2;
  
    s1=s.substring(0,s.indexOf('>')-1);
    s2=s.substring(s.indexOf('>')+2, s.length);
  
    if (s2=='Text/HTML' || s2==s1) {
        return (s1);
    }
    else
    {
        return (s);
    }
}

This function accepts a search result item title and first checks if the title is "Text/HTML". If so, it returns three dots ("...") instead. You will find this in grouped results, where the module title is displayed on its own.

If the title does not belong to a group subset, it'll be in the format "xxx > yyy" where xxx is the page's name and yyy is the module's title. The code breaks the string in its two parts and checks if the second part is equal to "Text/HTML". If so, it returns only the first part (the page's name). Also, if both parts are the same it once more returns the first part. Useful when a module has the same title as the page and you don't want to see this in search results.

This is not the best possible solution, but it's a decent workaround, provided that you don't have the character ">" anywhere in your module titles or page names. I know it can get better, but this is only to demonstrate how you can do it.
 
In order to put our function into effect, we have to go to line 107:

markup += '<a href="' + data.DocumentUrl + '"' + dnn.searchResult.defaultSettings.linkTarget + '>' + data.Title + '</a></div>';

and replace data.Title with fixTitle(data.Title):

markup += '<a href="' + data.DocumentUrl + '"' + dnn.searchResult.defaultSettings.linkTarget + '>' + fixTitle(data.Title) + '</a></div>';

Hide subsets (grouped results)

If, for some reason, you don't want to have any grouped results then you can comment out the code that is generating them. Be adviced that the result that was supposed to be grouped won't display a description underneath, just the title and link.

File: dnn.SearchResult.js
Location: DesktopModules\Admin\SearchResults

Go to line 159 and comment the code there until line 161:

// render subsets
                   for (var j = 0; j < result.Results.length; j++) {
                       markup += '<div class="dnnSearchResultItem-Subset">' + dnn.searchResult.renderResult(result.Results[j]) + '</div>';
                   }

Finally, if you tamper with the way search results are rendered, you may not want to have auto-search (search-as-you-type) get in your way by rendering everything in a different way (e.g. using default text/html module titles). There is no option for disabling it, but we can always hack the code a little more:

File: SearchSkinObjectPreview.js
Location: Resources\search

Go to line 137 and comment out this piece of code (until line 155):

throttle = setTimeout(function() {
                         var service = $.dnnSF ? $.dnnSF(-1) : null;
                         var url = makeUrl(val, service);
                         if (url) {
                             $.ajax({
                                 url: url,
                                 beforeSend: service ? service.setModuleHeaders : null,
                                 success: function(result) {
                                     if (result)
                                         generatePreviewTemplate(result);
                                 },
                                 error: function() {
                                 },
                                 type: 'GET',
                                 dataType: 'json',
                                 contentType: "application/json"
                             });
                         }
                     }, self.settings.delayTriggerAutoSearch);

This will prevent the Search skin object from auto-searching.

Well, that's all! Even if line numbers change with an upgrade, you have a reference point on what to seek in code. I know this is not the prettiest or the most accurate and bullet-proof solution in the world, but until DNN Corp.




DotNetNuke Hosting with ASPHostPortal :: How to Automate the Packaging of your DNN Module

clock Januarie 5, 2015 06:48 by author Mark

DotNetNuke has involved working with modules that I control, build, and have a say in. here I am set in my ways of how I like to do things, and believe that my approach to DNN module development is one of the easiest approaches to the DNN platform, because of this I have put a lot of time and effort into my Module Development Templates.
Occasionally I come across other people’s modules in my consulting work, and it tends to frustrate me when I have to do things outside of my own little “perfect module development environment”. I want to be able to switch to “Release” mode in Visual Studio and build, and have the scripts package the module I am working on so that I can easily deploy it to a customer’s development or staging environment. I had just such an experience this evening, working on customizing a module for a customer, and they had the Source to a third party module that I needed to make changes to. There is no packaging or build process anywhere inside of this module, even to the point where there are missing files in the “source” project itself.
I decided I must do something about this, so I took it upon myself to wire up my custom MSBuild scripts into the project so that I can easily build and deploy without having to go through the hoops of using the Host/Extension packaging process. Here are the steps you can use to integrate the scripts that are used in my Module Development Templates into your own existing modules (even if they weren’t built with the templates originally).

The steps below assume you are following my recommended development environment

  • Delete all source code and start over from scratch with my templates installed.
  • Open your project in Visual Studio
  • Install the MSBuildTasks project from Nuget: PM> Install-Package MSBuildTasks
  • Create a BuildScripts folder in your project
  • Add two files :
    • ModulePackage.targets
    • MSBuild.Community.Tasks.Targets
  • Right click on the project in Visual Studio Solution Explorer and choose "Unload Project"
  • Save changes if prompted
  • Right click on the unloaded project and choose the Edit option
  • At the bottom of the file, before the </Project> section add

<PropertyGroup>
  <Extension>zip</Extension>
  <DNNFileName>CHANGEME.dnn</DNNFileName>
  <PackageName>CHANGEME</PackageName>
  <MSBuildCommunityTasksPath>$(SolutionDir)\Build</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="BuildScripts\ModulePackage.Targets" />
<Target Name="AfterBuild" DependsOnTargets="PackageModule">
</Target>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />

  • Change the “CHANGEME” text to match the name of your .DNN file and the name of the ZIP file that you want the package created as.
  • Save the Project changes.
  • Right click on the project in Solution Explorer and choose Reload Project.
  • Switch into Release mode in Visual Studio and do a Build of your project.

This should create two files, ModuleName_Version#_Install.zip and ModuleName_Version#_Source.zip.

What I typically do then is install the module to a test DNN install to make sure that everything is working correctly. You’ll want to make sure that the ZIP files created contain all the right files, and they get installed correctly, so a test installation is the best way to go through that process.
If something fails, try to track it down, then do another Build in Release mode, rinse and repeat the installation process in your test install until you get everything working properly.
Now going forward, after you do a release, you go into your AssemblyInfo file, change your version number there, and into your .DNN File and change your Version number there. Next time you build in Release mode the module will create a new VERSION number ZIP file, leaving your last version builds there as well.



DotNetNuke Hosting with ASPHostPortal :: How to Automate the Packaging of your DNN Module

clock Januarie 5, 2015 06:48 by author Mark

DotNetNuke has involved working with modules that I control, build, and have a say in. here I am set in my ways of how I like to do things, and believe that my approach to DNN module development is one of the easiest approaches to the DNN platform, because of this I have put a lot of time and effort into my Module Development Templates.
Occasionally I come across other people’s modules in my consulting work, and it tends to frustrate me when I have to do things outside of my own little “perfect module development environment”. I want to be able to switch to “Release” mode in Visual Studio and build, and have the scripts package the module I am working on so that I can easily deploy it to a customer’s development or staging environment. I had just such an experience this evening, working on customizing a module for a customer, and they had the Source to a third party module that I needed to make changes to. There is no packaging or build process anywhere inside of this module, even to the point where there are missing files in the “source” project itself.
I decided I must do something about this, so I took it upon myself to wire up my custom MSBuild scripts into the project so that I can easily build and deploy without having to go through the hoops of using the Host/Extension packaging process. Here are the steps you can use to integrate the scripts that are used in my Module Development Templates into your own existing modules (even if they weren’t built with the templates originally).

The steps below assume you are following my recommended development environment

  • Delete all source code and start over from scratch with my templates installed.
  • Open your project in Visual Studio
  • Install the MSBuildTasks project from Nuget:
    • PM> Install-Package MSBuildTasks
  • Create a BuildScripts folder in your project
  • Add two files
    • ModulePackage.targets
    • MSBuild.Community.Tasks.Targets
  • Right click on the project in Visual Studio Solution Explorer and choose “Unload Project”
  • Save changes if prompted
  • Right click on the unloaded project and choose the Edit option
  • At the bottom of the file, before the </Project> section add

<PropertyGroup>
  <Extension>zip</Extension>
  <DNNFileName>CHANGEME.dnn</DNNFileName>
  <PackageName>CHANGEME</PackageName>
  <MSBuildCommunityTasksPath>$(SolutionDir)\Build</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="BuildScripts\ModulePackage.Targets" />
<Target Name="AfterBuild" DependsOnTargets="PackageModule">
</Target>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />

  • Change the “CHANGEME” text to match the name of your .DNN file and the name of the ZIP file that you want the package created as.
  • Save the Project changes.
  • Right click on the project in Solution Explorer and choose Reload Project.
  • Switch into Release mode in Visual Studio and do a Build of your project.

This should create two files, ModuleName_Version#_Install.zip and ModuleName_Version#_Source.zip.

What I typically do then is install the module to a test DNN install to make sure that everything is working correctly. You’ll want to make sure that the ZIP files created contain all the right files, and they get installed correctly, so a test installation is the best way to go through that process.
If something fails, try to track it down, then do another Build in Release mode, rinse and repeat the installation process in your test install until you get everything working properly.
Now going forward, after you do a release, you go into your AssemblyInfo file, change your version number there, and into your .DNN File and change your Version number there. Next time you build in Release mode the module will create a new VERSION number ZIP file, leaving your last version builds there as well.



ASPHostPortal.com Proudly Announces DotNetNuke 7.3.4 Hosting

clock Desember 22, 2014 11:07 by author Dan

ASPHostPortal.com, The Best, Cheap and Recommended ASP.NET Hosting proudly announces DotNetNuke 7.3.4 Hosting with a combination of affordable price, fast & stable network and high customer satisfaction rate. ASPHostPortal.com provides full trust web hosting services for DotNetNuke 7.3.4 site.

DNN (formerly DotNetNuke) provides a suite of solutions for creating rich, rewarding online experiences for customers, partners and employees. DNN products and technology are the foundation for 750,000+ websites worldwide. In addition to commercial CMS and social community solutions, DNN is the steward of the DotNetNuke Open Source Project.

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. This version release to solve some issue, such as : 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 and many others.

ASPHostPortal.com, a windows-based hosting service provider offers the most reliable and stable DotNetNuke 7.3.4 web hosting infrastructure on the net with great features, fast and secure servers. Customer’s site will be hosted in USA, Amsterdams or Singapore based server. All of our windows hosting plan supports DotNetNuke 7.3.4 and you can install DotNetNuke 7.3.4 with just one click. We offer professional DotNetnuke 7.3.4 site start from $5/month. The following are the reasons why you should choose and keep trust with us :

Uptime & Support Guarantees
We are so confident in Windows hosting services, we not only provide you with a 30 days money back guarantee, but also give 99.9% uptime guarantee.

Best and Friendly Support
Our support team is extremely fast and can help you with setting up and using DotNetNuke 7.3.4 on your account. Our customer support will help you 24 hours a day, 7 days a week and 365 days a year.

Dedicated Application Pool
Your site will be hosted using isolated application pool in order to meet maximum security standard and reliability.

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. With the DotNetNuke 7.3.4 in their hosting deal will make ASPHostPortal continue to be the Best ASP.NET hosting providers. To learn more about DotNetNuke 7.3.4 Hosting, please visit http://asphostportal.com/DotNetNuke-734-Hosting

About ASPHostPortal.com :

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: 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 include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain each and every website and/or software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting with ASPHostPortal :: How To Creating a webservice in DotNetNuke 7

clock Desember 19, 2014 06:57 by author Mark

I have recently been assigned to built a DotNetNuke web service to allow a windows application (or any type of web client for that matter) the ability to manage DotNetNuke user accounts (create, change roles, delete, retrieve email address, etc.).
Since I had a hard time finding a correct code sample or documentation that actually applies to DotNetNuke 7 and accessing it without being previously logged in to DotNetNuke, it was difficult to built anything. I finally found out how to do it correctly so I tough I would put my efforts to some use and write a blog post explaining how to do it step by step.

The basics

That said, let's begin by the basics and just make a publicly accessible web service that allows anyone to ping the web service and get a pong back. For that we will use the new DotNetNuke 7 Services Framework which makes it quite simple if you know how to use it.
In order to make a web service that will work withing DotNetNuke 7, you will need to fire up Visual Studio and create a Class Library project (c# or VB but all examples here will be in c#).
That done, we will then reference some required DotNetNuke 7 required libraries (using 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:

  • We simply start with some using statements for our requirements as shown above
  • We create a namespace for our service and whatever name we use here will be part of the url. I used MyService just for this example but use any name that makes sense for your service.
  • Now we create a public class for our controller. You can create multiple controllers if you need to and the controller is just a group of related actions that make sense to group together. In my real project I have a PingController for testing purposes, a UsersController for any actions that relate to user accounts etc. Just use a name that makes sense since it will also show up in the url. Two things to be careful here:
  • The name of your controller must end with the word Controller but only what comes before it will show in the url, so for PingController, only Ping will show in the url path.
  • It must inherit DnnApiController so it will use the DotNetNuke Services Framework.
  • Then we create the actual action, in our case, PublicPing. It is just a simple method which return an HttpResponseMessage and can have a few attributes. By default the new services framework will respond only to host users and you need to explicitly allow other access rights if needed, in this case the [AllowAnonymous] makes this method (or action if you prefer) available to anyone without credentials. The second attribute, [HttpGet] will make this action respond to HTTP GET verb, which is usually used when requesting some date from the web server.
  • 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 need to return an HttpResponseMessage and not a string or int or other object.

Ok so our controller and action is done, now we just need to map that to an actual URL and that what the last part of the previous code does. In essence this code tells DotNetNuke to map a certain url pattern to the methods defined in your class. You can use that code as is just replacing MyService by whatever your service name is.

Testing:

That's all there is to it, your service is ready!  To test it, first compile it, then just navigate to http://yourdomain/DesktopModules/MyService/API/Ping/PublicPing and you should see "Pong!" in your browser as 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)

  • First we build a UsersController class that will hold all actions related to user accounts, it is not absolutely necessary, you can have many actions in the same controller, however since this action is not at all related to our PingController, let'a make a new one more descriptive.
  • We then make a GetEmail action (method) that will accept a userid parameter. The [RequireHost] parameter here will make it accessible only to host users, we'll see later other authentication options.
  • The code in the method itself is pretty much self explanatory. The only interesting thing to note here is that because our class inherits DnnApiController, we already have a PortalSettings object available. That's the big advantage of making use of the DotNetNuke Services Framework. You will have a ModuleInfo object to represent your module (if there is one with the same name as your service, which is not necessary such in this case), a PortalSettings object that represents the portal at the domain name used to access the service (portal alias) and finally a UserInfo object representing the user that accessed the web service.

Testing:

If we now navigate to http://yourdomain/MyService/API/Users/GetEmail?userid=2 you should receive the email address back from the server unless of course that userid does not exist, make sure to test with a userid that actually exists for that portal. If you where not previously connected with a host account, then you will be asked for credentials.

Limiting access to certain roles

Ok, that works but you need to give host credentials to any person needing to use your webservice. To avoid that you can replace [RequireHost] by [DnnAuthorize(StaticRoles="Administrators")] which will limit access to administrators. Better but you still need to give them an admin account. So the easy way to give only limited access would be to create a new role in DotNetNuke just for your web service and replace Administrators by that specific role name in the authentication parameter.

Using HttpPost : (answer to a comment down bellow)

To answer Massod comment bellow, it is almost the same thing but you need to create an object to contain the posted data.
Let's make a simple ping that uses POST, first we need to create an object that will contain the posted data such as:

Then we create the service method something like this:

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:

The important thing to not here is that you can't just create your POST method taking a string even if this is only what you need, you do need to create an object that will take your parameters.
Also don't forget that this is only for testing, you usually don't want to make this publicly available, you would normally use another parameter than [AllowAnonymous] such as  [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] and [ValidateAntiForgeryToken] unless you really want that to be public.
Let me know if you have any more questions.



About ASPHostPortal.com

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

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

Author Link


 photo ahp banner aspnet-01_zps87l92lcl.png

Corporate Address (Location)

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

Tag cloud

Sign in