Wednesday, November 21, 2012

SharePoint 2013 Environment Configuration

When setting up a SharePoint 2013 Environment, you will have to set up a virtual machine as an Active Directory Domain Controller as well as the actual SharePoint 2013 Server.  Whereas this was not a requirement in earlier versions of SharePoint (such as SharePoint 2010), the new architecture of SharePoint 2013 requires components such as the Workflow Manager and the Windows Azure Service Bus require the separation of these server responsibilities.

In addition, if you are using virtualization to set up your SharePoint Development environment infrastructure, you will need to allocate approximately 10-12 GB for the SharePoint Server (Single Server Installation) as well as the recommended amount of memory for an Active Directory Domain Controller (depending on the guest OS).

If you are using automated build scripts such as AutoSPInstaller (http://autospinstaller.codeplex.com/) or the corresponding GUI for this set of PowerShell Scripts (http://autospinstallergui.codeplex.com/), then you will also need to join the virtual machines to an Active Directory domain since the scripts currently do not support standalone/local installations of SharePoint.

For a review on how to set up 2 or more virtual machines that are joined to a domain, you can review this earlier blog post: http://samirvaidya.blogspot.com/2012/05/joining-2-or-more-virtual-machines-to.html

If you want a detailed installation and configuration guide for SharePoint Server 2013, you can download a copy of such a guide from here: http://criticalpathtraining.com/Members/Pages/default.aspx

Monday, November 19, 2012

Tip to always remember when working with PowerShell

I work with PowerShell frequently on a variety of computers as well as virtual machines and whenever I work on a different machine, one of the most common tasks I always forget to accomplish is to change the Execution Policy in the PowerShell window:

Using the Set-ExecutionPolicy Cmdlethttp://technet.microsoft.com/en-us/library/ee176961.aspx

The safest policy to follow is to set the ExecutionPolicy to RemoteSigned, however, in some cases, the ExecutionPolicy may also be set to Unrestricted.  


Multiple connections to a server or shared resource are not allowed

When mapping a network drive, if you receive an error message similar to the following: "Multiple connections to a server or shared resource by the same user, using more than one user name are not allowed", you may find the following Microsoft support article describing possible solutions to the problem: http://support.microsoft.com/kb/938120

However, this solution is a bit difficult and tedious, but fortunately, there is a readily available improved solution to this problem.  You can simply use the following command:

net use * /delete

This command will list out all of the available network connections for deletion. After reviewing all of the current network connections, you can confirm any network connections to delete.  Once these have been deleted, you can then re-establish the network connection with the appropriate user credentials!

Saturday, November 17, 2012

Deploying Custom User Controls for Sitefinity

If you ever have to deploy custom User Controls to Sitefinity that are written in Classic ASP.NET (not ASP.NET MVC), below are the following steps to accomplish this:

  1. After creating the project using Sitefinity Project Manager, open the project using Visual Studio 2010 or Visual Studio 2012
  2. By default the Visual Studio project will have a name of SitefinityWebApp
  3. After the project has been opened in Visual Studio, create a folder in the Visual Studio project to house the User Controls that you will be creating such as "UserControls"
  4. Add an ASP.NET User Control to the folder
  5. Begin developing the content that you want to add to the User Control
  6. Compile the SitefinityWebApp Visual Studio project using the Build option.  NOTE: If you use the Rebuild option, you will end up deleting unreferenced assemblies in the project thus causing additional problems with the deployment
  7. After compiling the project, you will have to register the control in the Toolboxes section in Advanced Settings
  8. After the control has been registered in the Toolboxes section, you should be able to open a Sitefinity Content Page and add the User Control as a Widget to the Page
  9. After publishing the Sitefinity page, you should be able to view the resultant page
  10. If you are then deploying this content to a hosted server for a fresh installation, you will have to do the following:
    1. Deploy the entire contents of the local directory structure
    2. If necessary, change the database connection string to provide the appropriate database credentials on the target hosting server
  11. If you are deploying changes to a hosted server, the steps you will have to follow differ slightly:
    1. Deploy any changes that were made to the local directory structure (such as the creation of the User Controls directory).  Any code behind files are not required, only the .ascx source code which contains the presentation code.
    2. Register the appropriate User Controls in the Toolboxes section of the Advanced Settings
    3. Deploy the SitefinityWebApp.dll to the bin directory on the target hosted server
    4. Add the widget to the appropriate Sitefinity Content Page and verify that the widget is working as expected