DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke 7 Hosting with ASPHostPortal.com :: How to Automate your DotNetNuke Module

clock Augustus 23, 2014 09:00 by author Kenny

DotNetNuke is an open source CMS based on Microsoft .Net technology. DotNetNuke can be easily installed and hosted. In general, DotNetNuke framework allows individuals to do whatever they wish with the application framework both commercially and non-commercially, with the simple requirement of giving credit back to the DotNetNuke project community. In this article, I will tell you how to automate the packaging of your DNN Module.

DotNetNuke is a program that runs on Microsoft ASP.NET. It is also a framework, meaning, it is a program that is designed to be extended. One of the ways you extend the framework is to create modules. These modules are installed inside a DotNetNuke installation and when they run in that DotNetNuke installation they extend the framework to create a DotNetNuke website also called a portal.

Here are the steps for automate the packaging of your DNN Module:

  • Delete all source code and start over from scratch with my templates installed. If you really don’t want to go through step #1, you can skip it, but you must then go on to Step 2 below
  • 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.



Cheap DotNetNuke 7 Hosting :: How to Fix 404 Handling Error on DNN 7

clock Junie 5, 2014 06:15 by author Ben

404 Handling is the process of managing what happens when a visitor comes to your site and enters a Url/follows a link which isn't valid. The correct handling of 404 errors can really mean the different between a professional looking site, and one that still looks like it is in development. The name ‘404 Error’ is used because the web server returns a response code of ‘404’, meaning it couldn't find a matching file/resource for the Url. A well developed 404 strategy will retain users, keep search engines up to date and in general make your site look like a polished and finished effort.

Here is the tips how to fix 404 Handling Error on DotNetNuke 7 :

Keep in mind that a prerequisite for this strategy is that you must be using ASP.Net 3.5 SP1 or later. This will not work in earlier .Net Framework versions. Look at the customErrors section below in web.config:



There are a few things to notice here. First, the addition of redirectMode=”ResponseRewrite”. This enables a rewrite of the error page rather than a redirect. The next thing to notice is the specific instruction on what page handles 404 errors. Rather than ‘TheErrorPage.aspx’, 404 errors are handled by ‘404.aspx’.

Now we get to some specifics in DNN. In your DNN site create 'TheErrorPage.aspx' and '404.aspx' (or whatever you want to name them) in the root of your website. From my testing this does not work if you were to add this as a page within DNN itself (i.e. via Pages → Add). Instead, manually add these error pages in the root of the site.

Lastly add this bit of code to the 404.aspx error page:


This code simply ensures a 404 status is returned when the page loads, which should only be for 404 errors. You could do this in C# as well. You can add any HTML you would like to this page so you can provide a friendly 404 error page.

404 Error on DNN 7 Installation
If you are encountering an issue with DNN 7 installations that causes most of DNN's URLs to result in 404 errors then please try to following fix.

Within your site's web.config file locate the opening tag for the "modules" section of the web.config file which is:
"<modules>" (without quaotation marks)

Then modify it so that it reads as follows:
"<modules runAllManagedModulesForAllRequests="true">" (without quotation marks)

Then save the web.config file and restart your site.
That should resolve the issue and allow your links and pages of your DNN 7 installation to resolve correctly.


Need DotNetNuke hosting? Please visit our site at http://www.asphostportal.com. Just with only $4.00/month to get DotNetNUke hosting. If you have any further questions, please feel free to email us at [email protected].

ASPHostPortal.com, Microsoft No#1 Recommended Spotlight Hosting Partner, is now providing this FREE DOMAIN and DOUBLE SQL Space promotion link for new clients to enjoy the company's outstanding web hosting service.



DotNetNuke Hosting - ASPHostPortal.com :: Setting Up Your DotNetNuke 7 Development Environment Setup (DES)

clock November 27, 2013 06:15 by author Ben

To develop modules for DotNetNuke you must first have a DotNetNuke installation running on the computer on which you intend to develop them. Setting up your development environment can vary based on what your end goal is. If you are doing module development for your own use, and within your own DNN environments, you can ignore a few of the settings below. If you are doing module development with the idea that you might turn around and give the modules away, or sell them, then you will likely want to follow the guidelines set forth below to support the widest array of DNN installation environments.

I recommend that each developer have their own local development environment, with a local IIS website running DotNetNuke, and a SQL Server 2008/2012 (not express, though you can use it) database for the website. Having an individual development environment makes group module development far easier than if you share environments/databases.

The steps for setting up your development environment will apply to both the Community and Professional editions of DotNetNuke.

Installation Configuration

Once you have the version selection out of the way you can go through the installation process. While I’m not going to walk you through the minutest of details of each step of installing DotNetNuke in this post, I will at least try to point you in the right direction for each step. Download the INSTALL package of the version of DotNetNuke you want to use in your development environment. Extract the files in the INSTALL package to a location of your choosing, this location is where you will point IIS (the web server) when we can configure the website. In my environment I typically use c:\web\dnnme.com\ (One item of note: you may need to right click on the ZIP file and choose Properties before extracting, on the properties window if you have an UNBLOCK option, click that. Some versions of Windows have started blocking files within the DotNetNuke ZIP files, which will cause you problems later during the actual install.)


Setup IIS

IIS is the web server that comes with Windows computers. DNN 7 requires IIS 7 or later (7,7.5,8.0), so you will need at least Windows Vista, Windows 7, Windows 8, or Windows Server 2008 R2, Windows Server 2012. In IIS you should create a new website (Note: If you use an existing website in IIS be sure to add the HOST binding for DNNME.COM), and point to the folder where you extracted the INSTALL package.

Note: With DotNetNuke 7.0+, .NET Framework 4.0 is required, so be sure that your application pool is configured to run under 4.0, and not 2.0.
Set File Permissions

Setting up the file permissions for your DNN install is often the step that causes the most trouble. You should right click on the FOLDER in which you extracted DNN (c:\web\dnnme.com\) and choose properties. Choose the Security tab. You need to add permissions for the account in which your website's application pool is running under. You will want to setup the permissions to give the account Full or Modify permissions for the DNNME.COM folder. Which account you will use will vary based on your version of IIS, here’s a simple list of some of the default accounts based on the version of IIS.

  • IIS Version Operating System Account
  • IIS 7 Windows Vista, Windows Server 2008 localmachine\Network Service
  • IIS 7.5 Windows 2008 R2, Windows 7 IIS AppPool\APPPOOLNAME
  • IIS 8 Windows 2012, Windows 8 IIS AppPool\APPPOOLNAME

Note: If you are using IIS7.5/8.0 you’ll notice in the above table that we have APPPOOLNAME in the identity, this is because when you setup a new website in IIS a new application pool is created. In place of you should type in the name of the application pool that was created. You can also bypass this and configure your application pool to use the Network Service account instead of a dynamic account if you would like.

Database Configuration

In SQL Server you should go through and create a new database. I always create a database with the same name as the website, so in this case DNNME.COM. Once you have created the database, create a user that can access that database. I always use SQL authentication, turn off the enforce password requirements, and give the user DB Owner and Public access to the DNNME.COM database. Remember the username and password you create here as you will need them when you walk through the Installation screen for DotNetNuke.

DotNetNuke Installation Screen

Populate the installation screen with the standard DNN information, Host username, password, etc. For the Database option, choose Custom and configure your database connection, providing the Server IP/Name, the Database name (dnndev.me). For the database authentication you'll want to choose the option that allows you to enter the username/password for the database user that you created previously.
Now there are two additional options you can configure, normally I would tell you not to modify these, but from a development environment perspective I do recommend that you change the objectQualifier setting. It should be blank by default, you should type in “dnn” (without quotes), this will prepend “dnn_” to all of the objects that get created by DNN such as Tables and Stored Procedures. This is not something I recommend from a production stand point, but if you are developing modules for sale, then supporting objectQualifier in your development is recommended. It will save you time down the road if you have a customer who has an objectQualifier defined on their production databases.



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