Monday, December 31, 2012

SharePoint 2010 foundation on windows 7

If you are planning to install SharePoint 2010 foundation in your windows 7 machine, there are very good references out there in many blogs. But after I installed it I was not able to create new web applications.

I noticed, I was an administrator account with different name than administrator. I found here that we can enable in built administrator account.

I enabled administrator account and added it to managed accounts and farm administrators group.

After trying so many things from forums, finally I got everything working in SharePoint Foundation in my machine!

Monday, July 23, 2012

DotNetNuke: As an E-commerce help portal

DotNetNuke is a powerful content management system. I can say this because I am following DotNetNuke and improving myself since early 4.x release of it. I decided to spend some time on highlighting some of the key projects that I have done during last 6 years, that can describe capabilities of DotNetNuke. Here is the first one.

GolfOnline.co.uk - is an online e-commerce portal. An e-commerce portal feel completed once integrated with an easy to use, and great performing CMS. As a solution Help.GolfOnline.co.uk is built as an answer. This site is built using DotNetNuke and is working so well.

Here is the highlight of key features:
  1. Authoring: Contents can be hidden to users unless they are approved and intended to show to end users. 
  2. Branding: Flexible enough to re-use some of the ASCX controls from e-commerce web application for branding purpose. Integration went a little tricky but no problems at all. Most of the css/js/images are used from 
  3. Performance: Performs like accessing html pages
  4. Customization: Build/customize in whatever way you can. Good examples is sub tabs module to - showing child pages are tabs. (jQuery UI, jQuery, DotNetNuke API)
  5. CDN: Capability to integrate CDN so that css, js and some static html can be steamed through CDN.
  6. SEO: Free of cost implementation of custom urls (Thanks to iFinity Friendly Url Provider), along with all the goodness of SEO. 
  7. Search: This feature isn't used on site but it can be. In built search engine to find content.
  8. Quick: Go live in no time.
Please get some time and visit help.golfonline.co.uk and feel the strength of DotNetNuke. Notice the yslow rating and responsiveness of the site. 
I believe DotNetNuke can be smartly utilize to provide such kind of solutions in no-time. Isn't it?



Wednesday, February 1, 2012

Database Design : Smartly storing many user settings with Boolean values in a single value - Part 2

If you have visited a previous post, where I have demonstrated how you can use bit masks to reduce your settings table.

Update:
There are situations where this solution will NOT do well. Example are cases where you are having many settings OR expecting more settings in future. After some point, your calculated integer or big integer will become very huge and may cause out of limit. so be careful while deciding to use this solution.

ALSO, in place of integers, you can use bitbinary datatype with appropriate length and use appropriate bitwise operators in sql server. That will surely gain more performance.

Thanks to Yougeshwar Patel, Team Lead, Silver touch technologies for bring this to my notice.

Sharepoint: Creating web application from existing content database

There are situations where you want to propagate one SharePoint web application to some other farm/machine.   I feel the fastest way is to take content database backup and restore it in your destination farm. I have done so in last couple of weeks and I have leaned how to quickly do that.

Here are quick notes from my experience:
Pre-requisites:
I was provided with content database backup and source code. That makes be able to restore site and generate wsps from source code.

Creating  content database from backup:
Go to your database server and do following:

  • Create a blank database that will be used as content database 
  • Restore a database using content database back up from source farm.


Creating a web application:

  • Go to sharepoint central administration and create a new web application
  • While creating a new web application, use existing content database in database section
  • Sometimes if your database is too large, web application creation takes too long and times out. Don't worry at all. web application is still created successfully. It happened to me 4 times out of 5. 
Validating the web application:
  • Go to sharepoint central administration, click on application management. In "Databases" section you will find "Manage content databases"
  • Choose your application and it will show database status and number of site collections. If you are not sure how many site collections are there in backup, anything greater than 0 is good news.
Configure web application to work properly:
we are almost done now. Do following:
  • Go to sharepoint central administration
  • Click on "Application Management"
  • In "Site Collections" section click on "Change site collection administrators"
  • choose your web application set proper data in site admins.
Additional optional steps:
After performing all the above steps, it is still possible that you are not able to access your web application. 
  • Last thing to do is to install and deploy wsp by using stsadm or your favorite method. 
Conclusion:
It is always challenging to move applications from one farm to another. Specially when they are depending upon other service applications. In spent last two weeks to learn how to properly do that. I hope this will help you at some point during your sharepoint development.

Happy sharepoint administration!

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!






Popular Posts