Archive

Archive for the ‘DotNetNuke’ Category

DNN Module Deployment considerations

September 28, 2009 2 comments

AJAX Control Toolkit has two Versions 3.0.30512 and early version 1.0.20229.Two problems might occur after deployment.Assume I have a module with the latest version of AJAX Control Toolkit Version 3.0.30512 and there is an existing module with with the early version of AJAX Control Toolkit Version 1.0.20229 (The DNN(4.9.2) I am using has the AJAX Control Toolkit version 1.0.20229 in the bin folder.)

Assembly Files being deleted
After you install your module, the latest version of AJAX Control Toolkit Version 3.0.30512 will be copyed into Bin directory(overwrite the existing one if any) ,everything works fine until they delete a module which use AJAX Control Toolkit ,then the AJAX Control Toolkit dll will be deleted(if they tick deleted files when deleting module) and our module will stop working.

Assembly Versions conflict
After you install your module,the latest version of AJAX Control Toolkit Version 3.0.30512 will be copyed into Bin directory(overwrite the existing one if any) ,everything works fine until site admin upgrade a module which use the early version of AJAX Control Toolkit ,then the AJAX Control Toolkit dll will be overwrite to the previous version and your module will stop working.

Solution
If we can put AJAX Control Toolkit dll into Global Assembly Cache,it will solve the problem.However if this is not feasible ,then you need to document of version of the assembly and let the site admin be aware of version of the assembly.

kick it on DotNetKicks.com

Categories: Asp.net, DotNetNuke

Start your DotNetNuke Module Development.

September 27, 2009 1 comment

Here is the step to start DNN Module Development using C#
1.Install DNN starter kit for DNN Module Template
2.Create a new project (Select DotNetNuke Compiled Module template) and change the project location to {DotNetNukeRoot}\DesktopModules,you need to untick the create directory for solution option.The reason for that is that when you compile your project,the compiled dll have to go to [DotNetNukeRoot]/Bin folder ,the default DNN Module template project has the build setting to output the dll to ..\..\bin\.If you tick the create directory for solution option,the dll will not be able to make it to the [DotNetNukeRoot]/Bin folder
DnnModuleDev
3.Once you create the module ,you need to change the assembly name and default name space according to your project or you could go to
AssemblyInfo.cs to change it.
ModificationToModuleTemplate
4.Since the default targeted .NET Version is 2.0,you might want to change this to .NET 3.5.There is Gotcha when you change the targeted framework to .NET 3.5,it will add a web.config into your project.You will get the following error if you install your module to DNN now.I nomrally just delete the web.config to make it work,not sure it is best thing to do but it works.The web.config is also added if you drag a ajax control toolkit control from the tool box the first time and the same fix apply.There is another Gotcha waiting for you if you delete the web.config.Since you are compiling your module in .Net 3.5, but the DotNetNuke core in older version is not.You need to add assemblyBinding in your site web.config file.

<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Extensions” publicKeyToken=”31bf3856ad364e35″/>
<bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Extensions.Design” publicKeyToken=”31bf3856ad364e35″/>
<bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/>
</dependentAssembly>
</assemblyBinding>
</runtime>

webcoinfigerror
5.Sometimes the newly created Module does not have the correct references path for DotNetNuke.dll and Microsoft.ApplicationBlocks.Data.Dll,you can find the dlls from {DotNetNukeRoot}\Bin
CorrectRef
6.Delete all the code in page_load and other events which are not requried(what I normally do) or you can run the sql script and then build your solution if no errors you are ready to start your DNN Module Development. 🙂

kick it on DotNetKicks.com

Categories: Asp.net, DotNetNuke

Benefits and pitfalls of using DotNetNuke

August 13, 2009 Leave a comment

DNN is content management system.
Some suitable usage:

  • It is for content management.Some good examples can be found at
    http://www.dotnetnuke.co.nz
  • You can also used for SAAS,where you can create multiple site using the same module.

However, if you develop an web application which doing a lot of input processing(you might like to have multiple pages for different section ),DNN might not for you.Since in DNN module , everything has to be with one user control.You can not navigate to anther page.It is much better you create a seperate asp.net site rather than doing a dotnetnuke module.

Correct me if I am wrong.

kick it on DotNetKicks.com

Categories: Asp.net, DotNetNuke

DotNetNuke Configuration Error ( Install DotNetNuke on Windows server 2008 R2 or Windows server 2008 with IIS 7)

August 11, 2009 3 comments

Today I am followed the DNN forums instructions and a video to install DotNetNuke(version 4.9.02) on Windows server 2008 R2, I got the following error message.(See it at the end of the article).I double checked that I do give full permission to NETWORK SERVICE User Account.

After I have done a little bit research ,it turns out that in my application pool settings within IIS, the “identity” of the account has been set to ApplicationPoolIdentity rather than NetworkService.The “identity” of the account is the one that needs to be granted full permissions. As long as that name matches, you are fine. NETWORK SERVICE is simply the default,but it is not the default for my machine.See the screen shot below.
Applications Pools in IIS7.0

The following is the error message from DotNetNuke.

Access to the path ‘C:\DNN\DotNetNuke_Community_04.09.02_Source\Website\web.config’ is denied.

DotNetNuke has extensive file upload capabilities for content, modules, and skins. These features require custom security settings so that the application is able to create and remove files in your website.

Using Windows Explorer, browse to the root folder of the website ( C:\DotNetNuke by default ). Right-click the folder and select Sharing and Security from the popup menu ( please note that if you are using Windows XP you may need to Disable Simple File Sharing before these options are displayed ). Select the Security tab. Add the appropriate User Account and set the Permissions.

* If using Windows 2000 – IIS5
1. the [SERVER]\ASPNET User Account must have Read, Write, and Change Control of the virtual root of your website.

* If using Windows 2003 – IIS6
1. the NT AUTHORITY\NETWORK SERVICE User Account must have Read, Write, and Change Control of the virtual root of your website.

kick it on DotNetKicks.com

Categories: Asp.net, DotNetNuke