Archive | DotNetNuke RSS feed for this section

dotnetnuke tips and tricks

DNN5 DB login problem when installing

I wish to install the DotNetNuke V5.5 into my local machine.

My Machine Specification
Development Tool: Microsoft Visual Studio 2010
Database Tool: Microsft SQL Server 2008 R2
.NET Framework: Version 4
Operation System: Windows 7 Professional
Web Server: IIS7

on the DNN Portal installation wizard, I m not able to proceed to generate the database due to the Database User Login Failed. I m TRIPPLE checked it but still no luck.

Finally I found I need to set the Application Pool to “.NET Framework 2″ Under the IIS 7, then I solved the db user login problem.

After that, another problem come when you wish to use Ajax Control Toolkit which powered by “.NET Framework 3.5 or 4″, I need to set it back to version 4 after the DNN Portal Installation.

2 DotNetNuke Intances on Single Database

If you looking for a solution to create 2 and more DotNetNuke Web Instances to connect to a single Database to reduce the burden of web server.

Here is it,

  1. Create 2 web instance in 2 different web server, WebA [192.168.2.3]and WebB [192.168.2.4]
  2. In the target database, insert 2 new IP into the PortalAlias Table.
  3. Launch the web browser and test it out.

Multiple controls with the same ID “x” were found in DNN

“Multiple controls with the same ID ‘x’ were found. FindControl requires that controls have unique IDs.”

Solutions, go to HOST -> Module Defination.
Click on the Modules you deployed or developed.
Make sure the default page only ONE.

I went to check mine got 2 default page. That’s why i got such error.

Incoming search terms:

  • dnn multiple controls with the same id
  • sharepoint 2010 findcontrol
  • dnn database multiple controls same id
  • multiple controls with the same id were found sharepoint
  • multiple controls with the same id \10\ were found findcontrol requires that controls have unique ids in dnn
  • Multiple controls with the same ID \Uploader\ were found FindControl requires that controls have unique IDs
  • SharePoint 2010 FindControl Requires that controls have unique IDS
  • sharepoint multiple controls found
  • sharepoint multiple controls were found
  • sharepoint multiple controls with the same id were found

DNN Module DLL not reflected after deployed

Case Study:

After I deployed to UAT or QA server. The DNN Custom Module reflected correctly but not the DLL. I found that’s an extra folder called “Module” in Bin Folder.

I read through the .DNN file, I found thats a line

<supportsprobingprivatepath>True</supportsprobingprivatepath>

You just need to remove it, and then redeploy again, the Module’s DLL will reflect correctly.

SqlHelper.ExecuteScalar in DotNetNuke Modules

To deal with a complex business logic, you may write complex T-SQL in stored procedure. It may return -9, -5, -1, 0, 1, 2…. and so on.

We have to use SqlHelper.ExecuteScalar instead of SqlHelper.ExecuteNonQuery.

Example,

public override long DeleteUser(long callingUserId, long userId)
{
SqlParameter[] paramArray = new SqlParameter[3];
paramArray[0] = new SqlParameter("@piCallingUserId", callingUserId);
paramArray[1] = new SqlParameter("@piDeletedUserId", userId);

paramArray[2] = new SqlParameter("@oiRetVal", 99);

paramArray[2].Direction = ParameterDirection.Output;

SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, GetFullyQualifiedName("User_Del_User"), paramArray);

return long.Parse(paramArray[2].Value.ToString());
}

Incoming search terms:

  • SqlHelper ExecuteScalar example
  • dnn executescalar
  • SQLHelper ExecuteScalar
  • dotnetnuke executescalar
  • dotnetnuke sqlhelper
  • sqlhelper executescalar output parameter
  • sqlhelper dotnetnuke more than one parameter
  • sqlhelper executenonquery dotnetnuke examples
  • c# executescalar dnn
  • sqlhelper executescalar paramarray

add meta tag in DotNetNuke

If you wish to add a meta tag in DotNetNuke, here the step to do it.

Go to Admin tab –> Page –> Click the page (home tab, for instance) –> the Page Settings –> Advanced Settings –> Page Header Tags

Enter the content you require, ie. I use this feature to date each of the pages for the search engines:

<meta name="example" content="example" />

Incoming search terms:

  • dnn add meta tag
  • add meta tags dotnetnuke c#
  • c# add meta tag dotnetnuke
  • dnn add meta tags to head
  • dnn add meta to head
  • dnn page header tags modified
  • dotnetnuke meta add all pages
  • dotnetnuke page header tags example

Error load CSS, Images or JS in DNN Skin

When you develop DNN Skin, always keep in mind you need to have put <%= SkinPath %> for your CSS and Images in your DNN skin development

for instance,

Put an image into the Skin, same directory with Skin ACSX but with a sub folder to put all skin’s images

<img src="<%= SkinPath %>images/button_calendar.gif" border="0" alt="Start Now" />

 Put a CSS or JS file into Skin

 

<link rel="stylesheet" type="text/css" href="<%= SkinPath %>skin.css" />

[sourcecode lang="c#"]

Incoming search terms:

  • dnn image skin error
  • show image by skin with dnn?

DNN Module Localization

Thats 2 ways i found for DNN Module Localization,

first is using ResourceKey without involve Code Behind in ACSX, example code

<asp:Label Id="lblPageTitle" runat="server" ResourceKey="lblPageTitle"/>

Another way is using Code Behind, sample code is

ASCX page,

<asp:Label Id="lblPageTitle" runat="server"/>

Code Behind,

<lblPageTitle.Text =Localization.GetString("lblPageTitle", this.LocalResourceFile);

Incoming search terms:

  • dnn localization
  • module localization
  • localization from code behind dnn
  • localization dnn module
  • label resourcekey dotnetnuke
  • guide for localization dnn module
  • dotnetnuke localization code behind
  • dnn module localization resourcekey not working
  • dnn localization resourcekey
  • using resourcekey dnn5

DotNetNuke C# Compiled Module Starter Kit

Seem like another DNN developer already created the C# compiled module Starter Kit for DNN4.x, this is very useful for those who want to develop the DNN module without open the DotNetNuke Project.

Here the link for you to download the starter kit.

Related Posts with Thumbnails

Incoming search terms:

  • DotNetNuke C# Compiled Module
  • download compiled dnn module for c# 2010
Get Adobe Flash playerPlugin by wpburn.com wordpress themes