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!

Hermann

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!

Hermann


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!

Hermann

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 :)
Hermann

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.


Enjoy!


Hermann

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.

Regards

Hermann

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!

Hermann