Archive | DotNetNuke RSS feed for this section

dotnetnuke tips and tricks

DNN Site Map

If your DNN website need a site map, you can find the open source application from [here].

After deploy the DNN SiteMap, the DNN really solve my problem, but I found out the SiteMap’s parent node order is not same with Tab Menu’s Order.

Here the Solution,

  1. download the source code [here]
  2. launch the VS.NET 2005 and open the solution
  3. double click SqlDataProvider.cs
  4. check out 2 methods here – GetRootNodesFromDb() and GetChildNodesFromDb(int parentTabId)
  5. notice the last line of each method which ORDER BY t.TabId
  6. ok, is show time now, replace  ORDER BY t.TabId to ORDER BY t.TabOrder, t.TabName –t.TabId
  7. you can compare both tab menu and sitemap parent node is tally now.

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.

failed to generate InfoClass using myGeneration

I try to use myGeneration code generator for DNN module prototype. My god!  It not able to display the tables of DNN database which I m just setup! After playing around with the tool. I found out the database name playing very important role here! Here the step I tried.

DB name = DNN4.6.2 ( Not able to display tables)
DB name = DNN4.6 ( Also not able to display tables)
DB name = DNN4 ( Finally able display tables)
DB name = DNN462 ( Yes, can able display tables)

Conclusion, Please dont put a ‘dot’ for your database’s name if you wish to use myGeneration to generate the code to speed up the development!

DotNetNuke Module Development

For those who wish to learn or know more about DNN module development but do not know where to start.

Here the link for you to start.

  1. Creating a DNN Module and Understanding DNN Architectural Approach [Click Here]
  2. Creating a DotNetNuke® Module – For Absolute Beginners [Click Here]
  3. Creating a Super-Fast and Super-Easy DotNetNuke® Module – for Absolute Beginners [Click Here]

Before launch your visual studio.NET 2005, please make sure you installed the DNN template & starter kit which you can find it [here], also DNN Source Code Version which you can download from [www.dotnetnuke.com]

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 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());
}
Related Posts with Thumbnails

Incoming search terms:

Get Adobe Flash player