Thursday, January 5, 2012

Exeception: admin/Menus/DNNActions OR DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions throws null reference exception

Problem:

If you have deleted or your dotnetnuke installation failed to install DDR Menu module, you will get following.

an error has occurred. DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Containers.ActionButtonList.get_ModuleActions() at DotNetNuke.UI.Containers.ActionButtonList.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

OR

An error has occurred.DotNetNuke.Services.Exceptions.PageLoadException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) ---> System.ApplicationException: Couldn't load menu style 'admin/Menus/DNNActions': System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Web.DDRMenu.DNNCommon.DNNContext.get_ModuleFolder() at DotNetNuke.Web.DDRMenu.DNNCommon.PathResolver.Resolve(String path, RelativeTo[] roots) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.MenuBase.Instantiate(String menuStyle) at DotNetNuke.Web.DDRMenu.DDRMenuControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Solution

It is a good news if you are installing your new dnn instance, you can download latest installation source from dotnetunke.codeplex.com and that will work just fine.

If you are already having dnn site running and you uninstalled the  DDR menu  by mistake, or you are upgrading the site or DDR menu  and that caused this problem, there are some ways to fix this.

Download and setup local copy of fresh dnn installation and do following:

  1. Open web.config of fresh install, and search ddr in it. Copy the DDR entry from it and paste it to appropriate section of your site's web.config.
  2. from fresh install replace /admin/menus and /desktopmodules/ddrmenu folders to your site folder.
  3. download  http://dnnddrmenu.codeplex.com/releases/70987/download/264940 and paste it into /install/module folder
  4. Browser for yoursite.com/Install/install.aspx?mode=InstallResources and that's it
In my case, we were trying to upgrade the DDR menu and found the broken site that was restored using above steps. 

For more updates and hints visit this thread on dotnetnuke forums

Monday, January 2, 2012

Using dapper .net to log site visitors in sqlite database - Part 1

Dapper .net is a simple light weight micro ORM

I came to this library (in fact a single page) while I was learning posts related to how StackOverflow.com is built. I also noticed that the library is independent of the database, and is useful if you are using any database.

I feel it is promising, and I am going to write a very simple site visitor logging component with this. The database I will use will be Sqlite and will log all the page views into database with the user, user agent and url referrer.

There will be following two NuGet packages that I will require:
  1. Dapper .net
  2. System.Data.Sqlite (I am using x86)
I am going to use Application_AuthenticateRequest in Global.asax to add logging.

All the code will be available at https://trickycoders.svn.codeplex.com/svn/WebsiteLogging

stsadmin -o deploysolution: access denied error

When

As like 80% of the sharepoing developers, if you are deploying your solutions trough command line.

What

After firing deploysolution, looking at system settings > farm solutions and the error looks something like "Can not overrite xxxx file, access is denied".

Solution

It was due to my source file was read only. I tried by un-checking the read only attribute from properties for source file and tried the command again. I got the same error couple of times and repeating the same solution fixed the problem.

Conclusion

As a social animal, when I get such kind of error first time in my life, I first ask to couple of developers around me if they have seen the same error ever, that helps a lot. When I do same, I got many useful hints that can either quickly solves the problem or useful for some future problems.

Update - 3-Jan-2011:

If you are having more than one application server in farm then you have to go through all of them and uncheck read only to get it working.

Got the same error? Don't worry try above solution and let me know if same OR some other solution worked for you.

Happy sharepoing deployment!






Thursday, December 29, 2011

GoDaddy - Using host entries to access your site by IP

Problem

Your site is live right now and you want to transfer it to another account hosted in GoDaddy.com. You have configured the site in new account and want to test it, but you can not directly update the DNS records without testing. You don't want to purchase a static IP for this. So, there should be a way to test your site before updating DNS records.

Solution

One of the solution is the use hosts entries. That will help you to access your domain point to the new IP only for you. That way, when other people accesses www.yoursite.com, it will be served from original site, but because of the host entry, when you try to access www.yoursite.com it will be served from the new server. I found the detailed instruction here: http://help.godaddy.com/article/3354

Friday, December 23, 2011

Runtime error: ; expected


I was working in asp.net with vb.net for for almost 3 years now, and now after 3 years, just started working on c# as back end language. So many times in a day I miss writing ; and got the this error!

I recently got this error in ascx control as well, when I was working in a repeater item template and missed # and write Eval like <% Eval...

Compiling code in C# reminds me to the starting of my career since I have worked on C# first.

Friday, December 16, 2011

Sharepoint: Debugging - which process to attach

As some of you may already be knowing, I have just joined a team of sharepoint developers and right now learning sharepoint development.



This is my first day to work on a development after watching videos and reading books and I already find myself lost while attaching to the process for debugging a webpart control in sharepoint. Here is how I finally got my ProcessID to attach:

Just open command prompt as administrator and type following:

%windir%\system32\inetsrv\appcmd.exe list wp

Hope this will help to the developers who are new OR not knowing the way to find which process to attach.

Happy coding.

Sunday, April 10, 2011

OSDNNSKINS: New version of cash and multiflex with portal template available

Hi all,

New Version for Cash and Multiflex is available for download. This time we have three common changes for both of the skin packages.
  1. There is only single package for skin and container installation
  2. Portal template is available to quickly evaluate the skin. 
  3. Both of the skins are tested in dnn 6.0.0.44 
For those who are not knowing about this, open source dotnetnuke skins is an initiative to provide high quality free skins to dnn community.

More contributors to osdnnskins:

We have more contributors to join the party, so we welcome issues and suggestions from community in order to help them provide quality skins for free.

there are lots of evaluations and  also there are many sites using skins from osdnnskins, there are very less number of comments and feedback that we get.


Please please please provide your feedback about any skin that you evaluate and you can directly go to osdnnskins.codeplex.com to create a new issue or you can email me any time for any kind of help regading the same.
You can contact email @ lakhlaniprashant [at} gmail [dot} com

Popular Posts