Wednesday, November 21, 2012

SharePoint 2010 on Windows8. Sure why not....

How to deal with the dilemma of a new Windows 8 PC and the need to stay a productive SharePoint dev for your customer's???  Get SharePoint 2010 working on your Windows 8 PC, simple as that or it would seem.  Luckily like most things these days I was not the first person to try this or blog about the scenarios and gotchas.  Thank goodness for that new fangled internet thingy.  Below are a couple of blogs that I used to get my environment up and running.  There were a couple of issues that I encountered that were not identified or addressed by these posts and I have provided those as well.  Good luck to all and who needs a Start button anyways!

John Livingston has a good post and a great script for updating IIS on your Windows 8 machine:

http://johnlivingstontech.blogspot.ca/2011/09/installing-sharepoint-2010-on-windows-8.html

I also found the blog by Pradip on installing SharePoint on Windows 7 helpful to get past some initial issues and prerequisites:

http://spradip.wordpress.com/2011/01/08/installing-sharepoint-2010-in-windows-7-64-bit/

Between the 2 blogs I was able to get a successful install and that's when the real fun started.  I was unable to successfully complete the configuration wizard after install due to a couple of issues.

Issue 1: Was with InfoPath 2013.  Every time I attempted to run the Config wizard I received this error.

"Could not load file or assembly 'Microsoft.Office.InfoPath, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.Office.InfoPath, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.


and it would cause the wizard to fail.  I was unable to find a solution for this issue other than to modify my Office install and remove InfoPath 2013.  This work around removed this issue.  Now just need to hope I don't need InfoPath 2013 for a bit.

Issue 2:  Was casused by my dev machine not being connected to the dev domain that I was using.  Dumb mistake I know but hopefully by me posting this it can save someone else a few minutes.  This is the error I received for the no contact with domain error.

Exception: System.ArgumentException: Specified value is not supported for the {0} parameter.


Issue 3: Was caused by the .Net 4.0 Framework that comes with Windows 8.  The script by John Livingston does attempt to address this but the issue I encountered was with the new app pools that SharePoint attempts to create during configuration.  Once SharePoint creates the app pool you have to go into IIS and change the Advanced Settings of the App Pool to run as the 2.0 .Net framework.  This resolved my issues with the Central Admin web app but did not work when creating a new port 80 default Web App.  To get my default port 80 Web App to work I had to first create a new App Pool and set the .Net framework to 2.0.  Then in Central Admin when creating a new Web App I selected the option to use an existing App Pool and selected the newly created 2.0 App Pool.



And like magic I had a new SharePoint 2010 Publishing Web App up and working on Windows 8.


I hope this can help save someone some time and keep them productive while enjoying all the new toys and trinkets of Windows 8.  

WHO NEEDS A START BUTTON ANYWAYS!!

Monday, July 30, 2012

SharePoint Server 2013 Snapshots....more to come

I am working on reinstalling SharePoint Server 2013 on my dev environment and during the process this time I grabbed a few snaps of some stuff that caught my eye right off when setting up a new Publishing Portal. 


Here is a quick look at the new Site Actions Menu



New "Change the look" section




Here you can preview what you just selected


New Central Admin home page


New People Picker drop downs



New Team Site home page

Stealing this one because it applies.  Thanks new polite SharePoint


 

Monday, April 16, 2012

SharePoint 2010 PreSaveAction() saves the day...

Looking for a quick way to do some validation when working on a SharePoint 2010 Foundation product and you don't have access to the InfoPath toolbox that SharePoint Server 2010 provides??  Let me introduce you to PreSaveAction() javascript call!  This function is available in 2007 and 2010 it is just a little easier to access in the 2010 platform with the ability to edit list forms through the ribbon.  Below is a quick script from MSDN for validating that attachments are added to a List Item in a Custom List but this is just the beginning.  You could verify column formatting and any other PreSubmit work that you need to happen on your custom lists.  Place the script in a ContentEditor webpart on your NewForm.aspx and EditForm.aspx pages and you are ready to Validate your buns off!!

   <script language="javascript" type="text/javascript">;

function PreSaveAction() {
var attachment = document.getElementById("idAttachmentsTable");

if (attachment == null || attachment.rows.length == 0) {

document.getElementById(
"idAttachmentsRow").style.display = 'none';

alert("Attachments are required on this list.");
return false;
}else { return true; }

} </script>;

Wednesday, April 11, 2012

InfoPath 2010 Repeating Table Updates Field On Change

When working in InfoPath you can run into business situations where a fields value is set based on user selections in other fields.  This can add a layer of complexity when the fields exist in a Repeating Table as each row needs to be executed independently.  But do nt worry there is a simple solution for this requirement as each InfoPath form is just a structured XML document on the back end.  This solution is given as code behind as this provides the quickest solution.  The sample below executes on a change event of a control in a repeating table and not on the insertion of a row as this would present null issues in the code.

public void Control_Changed(object sender, XmlEventArgs e)

{
//check to ensure value changed and not just row add if so run the code
if (e.Operation == XmlOperation.ValueChange)
{
//connect to current row in dom
XPathNavigator xnDoc = e.Site.CreateNavigator();
xnDoc.MoveToParent();                               
//select node that was changed in current row
string myVar = xnDoc.SelectSingleNode("my:Node", this.NamespaceManager).Value.ToString();
//select node in current row to update
XPathNavigator UpdateNode = xnDoc.SelectSingleNode("my:NodeToUpdate"this.NamespaceManager);
UpdateNode.SetValue(myVar);
}

}

Thursday, March 8, 2012

Forms Based Authentication on an exisiting SharePoint 2010 Classic Mode web app

If you are trying to implement Forms Based Authentication on an exisiting SharePoint 2010 web application there is no way through Central Administration to change your existing Classic Mode Web Application to Claims Based.  Below is a quick and easy PowerShell script that will accomplish this for you.

$webapp = Get-SPWebApplication "http://yourwebappurl/"
$webapp.UseClaimsAuthentication = "True"
$webapp.Update()
$webapp.ProvisionGlobally()

At this point you are now set to complete the steps to implement Forms Based Authentication on your Web Application.

Wednesday, November 2, 2011

MUSCLE MAN...HULK OUT!!

Great after dinner action with my son showing his muscle pose after eating all of his celery like the wonder pets! 

Thursday, September 22, 2011

Blessed

Not sure if anyone else likes the show modern family but i love it. I mean i crack up like i havent ever or at least in a long time over a tv show. And i love it because they seem like a family. And is there anything better or more valuable than family? Today I took my son to the first of what i hope is many times to the golf course. And he had the time of his life. He absolutely had a blast. He loved being outside! He ran and splashed in mud puddles and had the time of his life. He even got to drive the golf cart. There was one scary moment but we made it through that too. Thank God!! We almost flipped the whole cart trying to catch his cap. Check him out.




On top of all this I birdied 17!