Skip to main content

Posts

Showing posts from 2012

Sitecore Advanced System Reporter (ASR) export error

ASR for Sitecore can be a powerful module to increase the reporting capability users have in Sitecore. I recently found an issue with the export functionality of the module though. You can run and report and export it to csv or excel which is  a great feature, however, there is a requirement that is never called out anywhere. When I first tested this I was logged in as Administrator. The report ran great and I was able to export and download the report in excel format. However, when you login as a normal user (one that is not admin) you get a little different behavior. When you click export you are prompted for your email address. Wait, I was just able to download the file as an admin why does it need my email address now? Well it turns out that a non-admin user cannot just download the report, they have to email the downloaded report. For this reason  you are prompted for an email address. If you provide one and SMTP is not configured you just get an error. If SMTP is configured  you

Enabling Sitecore DMS

I have been working more with Sitecore as of late and one of the things I wanted to do was work with DMS. Every time I went into a DMS functional area though all I could get was "Analytics is disabled" message. So it was time to start plugging away to figure out why. The install steps are not clear, or at least they were not to me. Here are the steps I took to getting DMS enabled: 1) First check out John West’s blog for some things to check If you are missing the Sitecore.Analytics.config file you probably missed the database install step of getting DMS up and running. You need to make sure you download and unzip the database zip file that holds the config files and database files for the Analytics database, for your version. Once you have that download here are a few steps you may have missed. 2) Move the config files to <sitecore site>\Website\App_Config\Include 3) Add a connection string settings to the ConnectionString.config file (<sitecore site>\Website\Ap

Two weeks with the Microsoft Surface

The Microsoft Surface has been out for about two weeks now and I have been working with my for the same timeframe. I wanted to write up my experience with it to date. I have been trying to put it through its paces as much as I could. I will try and cover all the things I have done with it so you get a feel for where my opinion is coming from. For background I have only owned one other tablet in my life and it was the first version of the iPad. After a month or so of the iPad I stopped using it. Maybe that was because I shared it with my kids and wife. I think it was a combination of that and just not enjoying it as a primary device and apple kind of bugs me. When I went to get the surface I was not sure if I would get it. When I finally got my hands on the hardware I was really impressed and it made it hard to say no. I got the 32GB devices with the type keyboard (writing this review on it now in fact). I have used it in a number of different scenarios the past two weeks and I will t

Multi-Threading with ThreadPool and a Thread Manager

The past few weeks have been spent trying to make some tasks in a winforms app multi-threaded. Threaded applications can get tricky really fast. I needed to create a thread manager that helped me queue and create new threads via the ThreadPool. Here is the solution I came up with. I by no means think is the best or only solution. It in fact has one constraint with it I will call out at the end. It is an approach to doing threading in .Net applications though. I needed a class that would do the following: - Calculate how many threads to spin up - Calculate how much work to give to each thread - Queue new threads with the ThreadPool - Determine if WaitHandles needed to be created for the new threads - Pass the WaitHandles to the new threads so they can signal when complete - Return a collection of created WaitHandles back so future process could wait on all threads if needed First I created a ThreadState object to hold the information I needed to pass to each thread. 1: pub

Free eBooks

Microsoft has been kind enough to release a number of free eBooks around their technology, and finally a number of them in a format besides PDF. If you want to read up one things like Azure, Windows Phone, SharePoint and Office here are some good starting points. Azure, SharePoint, WP, Windows 8, Office – set 1 Azure, SharePoint, WP, Windows, Office – set 2

Running WIF Relying parties in Windows Azure

I am coping this blog from another blog here . Copying it here just to make sure I can find it in the future. My Azure app had this issue and this fixed the problem.  When running in a multi server environment like windows azure it is required to make sure the cookies generated by WIF are encrypted with the same pair of keys so all servers can open them. Encrypt cookies using RSA In Windows Azure, the default cookie encryption mechanism (which uses DPAPI) is not appropriate because each instance has a different key. This would mean that a cookie created by one web role instance would not be readable by another web role instance. This could lead to service failures effectively causing denial of the service. To solve this problem you should use a cookie encryption mechanism that uses a key shared by all the web role instances. The following code written to global.asax shows how to replace the default SessionSecurityHandler object and configure it to use the RsaEncryptionCookieTransfo

Create a Cert for Azure with MakeCert.exe

I have been working with Azure a lot as of late. One of the tasks I have had to do a few times is create a cert I can upload and that my Azure web role can use. I have gotten tired of always trying to remember the right command line to do this. By default MakeCert creates a 1024 bit cert which is no longer a valid bit size for IIS. If you don’t change this default and try and upload and use that cert your web role will continue to crash on you and never fully initialize (A fact I found out painfully. FYI, if you have this issue I not only need to create a cert with 2048 bit size but I need to change the cert name in my web role config.). So, if you have an Azure web role that keeps crashing on you and it is not for the standard reason of missing assembly that was not set to copy local, check your certs. Now on to the good stuff. Here is the command line I am using. makecert –r –pe –a sha1 –n “CN=<your name here>” –ss My –len 2048 –sp “Microsoft Enhanced RSA and AES Cryptographi

DevExpress Complexity (Maintenance & Cyclomatic

I have been using DecExpress’s CodeRush tools a lot recently. One of the many great features COdeRush gives you is inline Cyclomatic and Maintenance complexity scores of your classes and methods. The challenge is to remember how those scores rank so you know when you should start refactoring your methods. I found a great post here that I wanted to move over to my own blog just to make sure I could find it again and have it handy. There is also a PDF reference to all this info. Here is my summary of the key things (in case the other post goes away): Cyclomatic Complexity Probably the simplest measure of complexity. CC is the number of decision points for a method plus one. It also happens to represent the minimum number of test cases needed to travel through all branches of a method. Maintenance Complexity The purpose of Maintenance Complexity is to give you a picture of how much code you have in a given member.