DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting with ASPHostPortal :: How to Fix Problem DotNetNuke 7 Edit Button Not Work

clock Januarie 7, 2015 06:54 by author Mark

DotNetNuke 7 DNN Edit Button Will Not Work

After a clean install of DotNetNuke version 7.00.05, the Edit buttons would not work, and the page would repeatedly redirect to the homepage when clicking Edit. I did not experience this issue on installations which I upgraded.  I have uncovered three solutions which work, or at least work around, to solve the problem.

Method 1

One way to get around this problem is to use the Ribbon Bar instead of the Control Bar as the Control Panel setting. To make this change, navigate to the “Host” panel, click “Host Settings”, click the “Other Settings” tab. Set the “Control Panel” setting to “RibbonBar”.

Method 2

The second method, and one of the methods which actually solves the “ControlBar” issue, is to edit the web.config file. I found this solution at chaydigital. This method does work to solve the problem, but I have concerns about the waste of system resources it could cause as well as possibly creating other errors.
Open the web.config file in Notepad.exe or another editor. Find the system.webServer section, and change this section:

<system.webServer>
   <modules>
To this:
<system.webServer>
   <modules runAllManagedModulesForAllRequests="true" >

Method 3

Due to my concerns with placing a global fix in my web.config which might cause other errors to crop up, I decided to create two new installs on the same machine. One install was with the 7.00.05 full install package of DotNetNuke. The other install was with an older version of DotNetNuke 6 to which I applied the 7.00.05 upgrade. As suspected, in the full install website, the Edit button would not work. In the upgraded website, the Edit button worked as expected.
I decided to pull the two web.config files and compare them using a Powershell script. There were many differences in the two, but I found one difference in particular which seems to have solved my problem. The upgraded website had an entry for the FormsAuthentication module in the system.webServer section. and this entry was missing from the full install. This may be by design, I am not sure. But putting that entry in web.config on the full install version solved my issue.
Please attempt editing your web.config file at your own risk. Note that the system.webServer and modules nodes should already be there along with several other entries. The only entries you should add are in red type.

<system.webServer>
   <modules>
      <remove name="FormsAuthentication" />
     <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="" />
</modules>
<system.webServer>

Hope this helps you. If you find additional solutions to the issue, let me know. I will gladly add them to the list.

 



ASPHostPortal.com Proudly Announces WordPress 4.1 Hosting

clock Januarie 6, 2015 08:20 by author Dan

ASPHostPortal.com, The Best, Cheap and Recommended ASP.NET Hosting proudly announces WordPress 4.1 Hosting with a combination of affordable price, fast & stable network and uptime guarantees. ASPHostPortal.com provides full trust web hosting services for WordPress 4.1 site.

After nearly four months of development, WordPress 4.1 is available for download. WordPress 4.1 contains several improvements such as a new default theme, an improved distraction free writing experience, and plugin recommendations.

With the release of WordPress 4.1 just a few days ago, millions of people have had the opportunity to use the improved Distraction-free Writing Mode. When you enable Distraction Free Writing mode, the surrounding interface disappears as you type leaving important actions and menu items just a mouse movement away. This mode minimizes distractions without having to go through a clunky transition to access the admin menu or meta boxes. To bring back the menu and meta boxes, move the mouse cursor to the left or right of the editor.

On the Add New plugin page in WordPress 4.1, there are two different tabs to help users discover new plugins: Featured and Popular. The recommendations take into account the plugins you have installed and suggests plugins based on which ones are commonly used together. It’s similar to an e-commerce shopping cart that recommends products other customers have purchased based on what’s in the cart.

ASPHostPortal.com, a windows-based hosting service provider offers the most reliable and stable WordPress 4.1 web hosting infrastructure on the net with great features, fast and secure servers.  We has architected our network like no other hosting company. Every facet of the network infrastructure scales to gigabit speeds with no single point of failure. All of windows hosting plan supports WordPress 4.1 and customers can install WordPress 4.1 with just one click. ASPHostPortal offer professional WordPress 4.1 site start from $5/month. The following are the reasons why the customers choose and keep trust with our service:

Structured Recovery System
Recovery becomes easy and seamless with their fully managed backup services. We monitor the server to ensure customer’s data is properly backed up and recoverable so when the time comes, customers can easily repair or recover their data.

Excellent Expertise in Technology
The reason we can provide customers with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams.

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

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. With the WordPress 4.1 in our hosting deal will make ASPHostPortal continue to be the Best ASP.NET hosting providers. To learn more about WordPress 4.1 Hosting, please visit http://asphostportal.com/WordPress-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.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.



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