Tuesday, July 8, 2014

Installing Windows Service Bus 1.1

Hi guys

By far the easiest way to get the job done is to use the Web Platform Installer (you would think); however I ran into a problem where the Service Bus (Windows Azure Pack: Service Bus 1.1) didn't want to install since it depended on Microsoft Windows Fabric V1 CU1 and this dependency didn't want to install properly.

Turns out that your problem might be a missing VS C++ Runtime Environment.

I installed it after downloading it here

After the installtion was successful, no more Service Bus pains!

Good luck!


Wednesday, May 21, 2014

InfoPath: The security validation for this page is invalid.

Hi guys

The error message in the title can quite often be a real head scratcher, but the very good news is that it is quite easy to get rid of. It happens when your InfoPath browser form executes custom code that calls directly into the SharePoint object model and specifically when you try to update the underlying SQL databases (i.e. when writing to s SharePoint list).

In your custom code, please make sure that you set SPWeb.AllowUnsafeUpdates to true before your code that updates the database. In addition, please set this value to false again afterwards to comply with best pratices.

Happy coding!


Quick easy way to copy multiple files from a SharePoint list/library

Morning my dear readers

Here's a real quick easy way to copy multiple files from a SharePoint list/library. When you open a list or library, in the list/library tab, find the 'Open with Explorer' option in the ribbon. When you click on it, the list/library will (wait for it)....open with explorer! Be aware that it might take some time especially if it is a large list/library. From there on then you can go nuts and copy/paste as you normally would.

Hope this helps someone out at some point!

Happy days!


Wednesday, April 23, 2014

PowerShell - Correctly setting TrustedHosts

Hi guys

PowerShell has become such a valuable tool for administrators, that I myself am getting way too lazy to even think about opening RDP sessions to my servers. An extremely important function (obviously) is to be able to execute commands on remote machines; however you might run into trouble (especially when specifying the remote machine by IP) with default authentication issues:

Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Default authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to se
t TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.

To quickly configure TrustedHosts on your client, simply run the following command on the client machine (through a console with elevated privileges):

Set-Item wsman:\localhost\Client\TrustedHosts <yourservernameorip> -Concatenate -Force
Bob's your uncle!
Now go ahead and run your beloved 'Enter-PSSession' command again!
Be happy, life is good :)

Thursday, March 27, 2014

Control remote services with PowerShell

Dear Readers

Have you ever become so extremely lazy that you don't even want to use RDP to logon to your server so that you can start a service on it? It might just be me then, but either way PowerShell is just a great tool for remote admin.

In order to start a service on a remote machine:

get-service -displayname *<partofservicedisplayname>* -computername <machine> | set-service -status "Running"

Obviously you can stop a service similary by setting the status to "Stopped". Please note that you can also use parameters like -name (name of service).

Also please note that the "start-service" cmdlet will try to start the service on your local machine. The set-service cmdlet seemed to have done the trick for me.



Monday, March 10, 2014

Microsoft.SharePoint dll location (SharePoint 2013)

Hi folks

Just FYI, the location for the Microsoft.SharePoint dll (that you need for development purposes) is located at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
on the server where SharePoint is installed.



Use SharePoint PowerShell to find out your web's template

Good morning, readers!

By far the easiest way (in my experience) to do this is to use the following code:

This might return a template code that is not self-explanatory. In that case, please reference the excellent guide at: http://www.sharepointcolumn.com/sharepoint-2013-webtemplates/

Happy coding!


Wednesday, February 26, 2014

Understanding SQL Server Page Sizes

Dear Readers

I'm not going to claim this article as my own since it isnt! :)

Nevertheless, for those of you that want to know the intricate details behind the Microsoft SQL Server page sizes, I have found an excellent article:


Happy coding and have a great day!


Thursday, February 20, 2014

The power of association

Dear readers

This post (unfortunately ;) ) has nothing to do with programming; however I thought it worth sharing since it can speak to many of us and deals with being successful (which I sincerely hope that many of my readers want to be!).

Here it is:

The Power of Association is too real: The less you associate with some people, the more your life will improve. Any time you tolerate mediocrity in others, it increases your mediocrity. An important attribute in successful people is their impatience with negative thinking and negative acting people. As you grow, your associates will change. Some of your friends will not want you to go on. They will want you to stay where they are. Friends that don't help you climb will want you to crawl. Your friends will stretch your vision or choke your dream. Those that don't increase you will eventually decrease you.

Consider this: Never receive counsel from unproductive people. Never discuss your problems with someone incapable of contributing to the solution, because those who never succeed themselves are always first to tell you how. Not everyone has a right to speak into your life. You are certain to get the worst of the bargain when you exchange ideas with the wrong person. Don't follow anyone who is not going anywhere and most importantly, don’t follow anyone who is running away from your life. With some people you spend an evening: with others you invest it. Be careful where you stop to inquire for directions along the road of life. Wise is the person who fortifies his life with the right friendships. If you run with wolves, you will learn how to howl, but if you associate with eagles, you will learn how to soar to great heights.

"A mirror reflects a man's face, but what he is really like is shown by the kind of friends he chooses." The simple but true fact of life is that you become like those with whom you closely associate - for the good and the bad. Note: Be not mistaken. This is applicable to family as well as friends. 

“When I compliment you, I compliment myself, because I am who I associate with.”
~ Jarod Kintz

Tuesday, February 18, 2014

Macro for batch converting in Excel

Hi folks

Today I needed to batch convert over a hundred Excel file from the old extension (.xls) to the new extension (.xlsx). By far the easiest way was to record a macro while doing one file and then adapting the code to run for all the files in the specific directory.

Here follows the code:

Happy coding!


Tuesday, February 4, 2014

Microsoft File Transfer Manager not working

Morning everyone

I just want to mention a quick workaround for an issue with Microsoft File Transfer Manager not working in IE11 (please also note that it seems to not be working in any 64-bit browser from Microsoft).

For IE11, press F12 to bring up the developer console and then scroll down on the left to get to the Emulation console. From here choose the Document Mode 9 and the Internet Explorer 9 as the User agent string. Your Microsoft subscription page will then reload and once this has finished, try to download the file again. This time, FTM should pop up.

Good luck. Sorry for the short post without explaining the reasons behind the issues. No time today :)

Happy coding!


Tuesday, January 21, 2014

Creating Date and Time dimensions for your data warehouse

Good morning fellow coders!

I won't write long, but I figured that it was worth mentioning that I found quite a nice article that will help you easily and quickly create Data and Time dimensions for your SQL data warehouse (or any other warehouse for that matter, but you would obviously have to modify the scripts slightly).

Enjoy the following link to its fullest:


Happy warehousing!

Tuesday, January 14, 2014

SQL Server 2008 R2 "Out of Memory" exception

Dear Readers

I have been away from this blog for much too long, but I'm back and getting back into posting about some of my favorite technologies. I ran into an interesting problem today. It's definitely common, but it was the first time for me. I was running a stored procedure on SQL Server 2008 R2 and got an "Out of Memory" exception.

I googled around and came across a fix which is quite easy. Well, let me not call it a fix since obviously it might not work for everyone; however it is currently working for me (running as I'm typing) so I thought I'd share.

Apparently, what happens is that you receive a .NET Exception. This happens when the result set that your query returns (in my case, I am using a "SELECT" statement to extract values into a cursor) is very large and you exceed the limits of a 32-bit virtual address space (2GB). The workaround is to run the stored procedure using the "sqlcmd" utility (as obviously CLI tools require way less resources).

Simply type 'sqlcmd' -S <servername> into your command prompt and press enter. Then type 'Use <database>' name to change to the relevant database. Press Enter' Type 'exec dbo.<sp_name>' to execute the stored procedure. Quite simple. Please let me know if this doesn't work for you. It would be interesting to try to solve more complicated problems.

Happy coding!