<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Adventures in SPWonderland.</title>
  <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/" />
  <link rel="self" href="http://blogs.flexnetconsult.co.uk/colinbyrne/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2012-11-15T09:37:29.2370126+00:00</updated>
  <author>
    <name>Colin Byrne</name>
  </author>
  <subtitle>Taking apart and putting back together</subtitle>
  <id>http://blogs.flexnetconsult.co.uk/colinbyrne/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>List Windows Groups in a SharePoint site and convert to DirectoryEntry</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/11/15/ListWindowsGroupsInASharePointSiteAndConvertToDirectoryEntry.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,45ec0818-23eb-43c2-9c34-7856045166bb.aspx</id>
    <published>2012-11-15T16:13:00+00:00</published>
    <updated>2012-11-15T09:37:29.2370126+00:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
On a Claims enabled site I needed to get a Windows DirectoryEntry object for each
group and list its members
</p>
        <p>
Using the LDAP Sid syntax and the ADSI operator allows for a quick lookup to AD
</p>
        <p>
$ClaimMan=Get-SPClaimProviderManager
</p>
        <p>
$web=get-spweb <a href="http://flxdev2010:25555/sitecol1/sub6/Test3">http://flxdev2010:25555/sitecol1/sub6/Test3</a></p>
        <p>
# Get User List
</p>
        <p>
$Users=$web.RoleAssignments  | % { $_.Member.Users } 
<br /></p>
        <p>
# Filter to get only windows groups – return Sid’s
</p>
        <p>
$WindowsGroups= $Users | ? { $_.IsDomainGroup -eq $true 
<br />
        -and $ClaimMan.DecodeClaim($_.UserLogin).OriginalIssuer
-eq "Windows"}  | % { $ClaimMan.DecodeClaim($_.UserLogin).Value }
</p>
        <p>
# RAW Sids here 
<br />
$WindowsGroups
</p>
        <p>
# DirectoryEntry list here 
<br />
$GroupEntries=$WindowsGroups | % { [ADSI]"LDAP://&lt;SID=$($_)&gt;" 
}
</p>
        <p>
# List members of group 
<br />
$GroupEntries | % { $_.Properties["member"] }
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=45ec0818-23eb-43c2-9c34-7856045166bb" />
      </div>
    </content>
  </entry>
  <entry>
    <title>SPClaimsUtility.AuthenticateFormsUser Invalid XML Error</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/11/14/SPClaimsUtilityAuthenticateFormsUserInvalidXMLError.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,56bdda30-0627-49cf-8054-918e95104b9a.aspx</id>
    <published>2012-11-14T11:58:00+00:00</published>
    <updated>2012-11-14T11:59:41.5011099+00:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
Hit a strange error that Google turned up blank on. 
</p>
        <p>
I had a password reset page that took some encrypted parameters and used SPClaimsUtility.AuthenticateFormsUser
to log the user in and set the session token.
</p>
        <p>
This code 
</p>
        <pre>Uri appliesTo = new Uri(Page.Request.Url.AbsoluteUri);<br /><br />
// Set the session token<br />
SPClaimsUtility.AuthenticateFormsUser(appliesTo,user.UserName, txtNewPassword.Text);<br /></pre>
        <pre>would fail with a an invalid XML Error</pre>
        <p>
System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
+2670818 
<br />
   System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char*
pSrcEnd) +5042301 
<br />
   System.Xml.XmlUtf8RawTextWriter.WriteString(String text) +85 
<br />
   System.Xml.XmlWellFormedWriter.WriteValue(String value) +1959831 
<br />
   System.Xml.XmlWrappedWriter.WriteValue(String value) +17 
<br />
   Microsoft.SharePoint.IdentityModel.SPTokenCache.GetBytesForSessionToken(String
cookieContents) +123 
<br />
   Microsoft.SharePoint.IdentityModel.SPTokenCache.WriteToken(SessionSecurityToken
sessionToken) +304 
<br />
   Microsoft.IdentityModel.Web.SessionAuthenticationModule.WriteSessionTokenToCookie(SessionSecurityToken
sessionToken) +136 
<br />
   Microsoft.SharePoint.IdentityModel.SPSessionAuthenticationModule.AuthenticateSessionSecurityToken(SessionSecurityToken
sessionToken, Boolean writeCookie) +40 
<br />
   Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.SetPrincipalAndWriteSessionToken(SecurityToken
securityToken, SPSessionTokenWriteType writeOperationType) +485
</p>
        <p>
 
</p>
        <p>
The problem happens because the SPTokenCache is writing the tokenreference claim into
an custom XML format. 
</p>
        <p>
The tokenreference contains, among other things, the AppliesTo Url. 
</p>
        <p>
XML has issues with characters outside a strict range including lower or higher Ascii
characters.
</p>
        <p>
The mistake i made was using Page.Request.Url.AbsoluteUri which includes the parameters
passed to the page,  this included lower Ascii characters as part of the encrypted
string (now this could be BASE64 encoded to avoid that).
</p>
        <p>
The fix is to pass in only the current Web Url
</p>
        <pre> Uri appliesTo = new Uri(SPContext.Current.Web.Url);             </pre>
        <pre> // Set the session token<br />
SPClaimsUtility.AuthenticateFormsUser(appliesTo,user.UserName, txtNewPassword.Text);</pre>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=56bdda30-0627-49cf-8054-918e95104b9a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Turn on tracing in SharePoint Diagnostics Studio</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/11/13/TurnOnTracingInSharePointDiagnosticsStudio.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,7978d1d1-3f0b-40c9-85ec-adc0ac3c6e49.aspx</id>
    <published>2012-11-13T11:18:00+00:00</published>
    <updated>2012-11-14T12:00:18.0954897+00:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
If you are getting a problem in SharePoint Diagnostics studio (part of the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=20022" target="_blank">SharePoint
Administration toolkit</a> ) it can be useful to turn on tracing for the app. 
</p>
        <p>
Create a file called spdiag.exe.config in the same directory as spdiag.exe and put
this in it 
</p>
        <p>
&lt;configuration&gt; 
<br />
    &lt;system.diagnostics&gt; 
<br />
        &lt;trace autoflush="true" indentsize="4"&gt; 
<br />
            &lt;listeners&gt; 
<br />
               
&lt;add name="TextListener" 
<br />
                   
type="System.Diagnostics.TextWriterTraceListener" 
<br />
                   
initializeData="trace.log" /&gt; 
<br />
            &lt;remove name="Default"
/&gt; 
<br />
            &lt;/listeners&gt; 
<br />
        &lt;/trace&gt; 
<br />
    &lt;/system.diagnostics&gt; 
<br />
&lt;/configuration&gt;
</p>
        <p>
 
</p>
        <p>
When you run SPDiag you will get a pretty detailed trace file generated.  For
some reason this app tends to log exceptions rather than display them in the UI.
</p>
        <p>
This helped me track down a blank report that was actually throwing an error behind
the scenes.
</p>
        <p>
System.Data.SqlClient.SqlException: Invalid object name 'TVF_RequestUsageAggregate_LogTime'. 
<br />
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection) 
<br />
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) 
<br />
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj) 
<br />
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() 
<br />
   at System.Data.SqlClient.SqlDataReader.get_MetaData() 
<br />
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString) 
<br />
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=7978d1d1-3f0b-40c9-85ec-adc0ac3c6e49" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Running a 32bit Application alongside SharePoint 2013 problems</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/11/11/RunningA32bitApplicationAlongsideSharePoint2013Problems.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,6a9ca2aa-31c0-4c73-b0ba-b52fd986a806.aspx</id>
    <published>2012-11-11T18:39:41.3155372+00:00</published>
    <updated>2012-11-11T18:39:41.3155372+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
I’ve just being doing a POC with SharePoint 2013 and I needed to quickly get a ASP.NET
app running on IIS on the same machine that hosted SharePoint.
</p>
        <p>
This app had a dependency 32 bit encryption DLL that I could not find a 64bit version
of so I needed to run it in 32bit mode and also Classic mode as I didn’t want to mess
with web.config changes. 
</p>
        <p>
So to get this running quickly I did the following 
</p>
        <p>
From a command line
</p>
        <p>
          <strong>cd %systemroot%\system32\inetsrv</strong>
        </p>
        <p>
          <strong>appcmd.exe set apppool "MyAppPool" /enable32BitAppOnWin64:true 
<br />
appcmd.exe set apppool "MyAppPool" /ManagedPipeLineMode:Classic 
<br />
appcmd recycle apppool "MyAppPool"</strong>
          <br />
        </p>
        <p>
You could easily use the UI to set the two properties <strong>Enable 32bit Applications</strong> and
Managed Pipeline Mode Classic
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Running-a-32bit-Application-alongside-Sh_FA0D/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Running-a-32bit-Application-alongside-Sh_FA0D/image_thumb.png" width="394" height="484" />
          </a>
        </p>
        <p>
I’ve done this before so I figured life would be good but no, when browsing the site
I got the dreaded <strong>503 Service Unavailable Error</strong>.
</p>
        <p>
This generally means the AppPool  had a problem starting up and normally its
a messed up web.config, section out of place, duplicate handlers, invalid XML, invalid
credentials, that kind of thing. 
</p>
        <p>
In this case the event logs were clear. IIS was not able to load a 64bit DLL into
the 32bit process. 
</p>
        <p>
          <em>Event Log Error Event ID 2282</em>
        </p>
        <p>
          <em>The Module DLL 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\isapi\spnativerequestmodule.dll'
could not be loaded due to a configuration problem. The current configuration only
supports loading images built for a x86 processor architecture. The data field contains
the error number. To learn more about this issue, including how to troubleshooting
this kind of processor architecture mismatch error, see <a href="http://go.microsoft.com/fwlink/?LinkId=29349">http://go.microsoft.com/fwlink/?LinkId=29349</a>.</em>
        </p>
        <p>
The finger points directly to a new ISAPI module in SharePoint 2013 and its stopping
our 32 site from loading. Probably part of the new Request Management piece in SP2013
(<a title="http://blogs.technet.com/b/speschka/archive/2012/09/14/working-with-request-manager-in-sharepoint-2013.aspx" href="http://blogs.technet.com/b/speschka/archive/2012/09/14/working-with-request-manager-in-sharepoint-2013.aspx">http://blogs.technet.com/b/speschka/archive/2012/09/14/working-with-request-manager-in-sharepoint-2013.aspx</a>)
</p>
        <p>
Yeah fine but why the **** is this getting loaded in a non SharePoint site. 
</p>
        <p>
In IIS 7.x there are global (i.e. loaded into every AppPool) native ISAPI modules
are loaded from the GlobalModules section, however IIS fully supports conditionally
loading an ISAPI module depending on if its a 32 or 64 bit, managed or classic pipeline
or even specific WebApplication’s
</p>
        <p>
You can check the GlobalModules section in the file ApplicationHost.config in %systemroot%\system32\inetsrv\config 
<br />
or list them with 
</p>
        <p>
appcmd list config  /section:globalmodules
</p>
        <p>
Example Section:
</p>
        <p>
&lt;add name="ManagedEngineV4.0_32bit" image="C:\Windows\Microsoft.NET\Framework\v4.0.30319\webengine4.dll"
preCondition="integratedMode,runtimeVersionv4.0,bitness32" /&gt; 
<br />
           &lt;add name="ManagedEngineV4.0_64bit"
image="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64"
/&gt; 
<br /></p>
        <p>
If we check the SharePoint module it has no conditions listed, some developer slackness
there as the OWSSVR.DLL entry does have some WebApplication preconditions listed.
</p>
        <p>
&lt;add name="SPNativeRequestModule" image="C:\Program Files\Common
Files\Microsoft Shared\Web Server Extensions\15\isapi\spnativerequestmodule.dll" 
/&gt;          
</p>
        <p>
We can apply a quick fix using this command 
</p>
        <p>
          <strong>appcmd.exe set config -section:system.webServer/globalModules /[name='SPNativeRequestModule'].preCondition:integratedMode,bitness64</strong>
        </p>
        <p>
Or you can manually enter the preCondition entry in the ApplicationHost.config file
</p>
        <p>
&lt;add name="SPNativeRequestModule" image="C:\Program Files\Common
Files\Microsoft Shared\Web Server Extensions\15\isapi\spnativerequestmodule.dll"
preCondition="integratedMode,bitness64" /&gt;
</p>
        <p>
With that in place the 32bit Web Application loaded with no other problems.
</p>
        <p>
I’d class this as a bug as it completely breaks 32bit apps for no good reason.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=6a9ca2aa-31c0-4c73-b0ba-b52fd986a806" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Update User Emails in SharePoint from Active Directory</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/09/17/UpdateUserEmailsInSharePointFromActiveDirectory.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,ccbe2f28-cfe2-4587-959a-fd00fb788583.aspx</id>
    <published>2012-09-17T16:18:55.615+01:00</published>
    <updated>2012-09-17T16:26:34.8449399+01:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
With SharePoint once a user is added to a SharePoint site the users email is saved
at that point in time and only updated if you have the User Profile Service setup
and running in which case a timer job updates user information in all site collections
in the Farm.
</p>
        <p>
Sometimes farms are created that stand alone and do not have the User Profile service
setup or it might be a foundation Farm which has no User Profile Service. In that
case this script might be useful.
</p>
        <p>
It gets the Email address from AD for every user in all site collections within a
Web Application and updates it if needed.
</p>
        <p>
From a Powershell prompt 
</p>
        <p>
To Report on out of date user emails 
<br />
.\FixUserEmails.ps1 <a href="http://sharepointurl">http://sharepointurl</a><br /></p>
        <p>
To update emails 
<br />
.\FixUserEmails.ps1 <a href="http://sharepointurl">http://sharepointurl</a> $true
</p>
        <p>
        </p>
        <p>
Should work for 2007 and 2010.
</p>
        <p>
Its not guaranteed to work across multiple domains as the sAMAccountName attribute
does not contain the domain, otherwise let me know of any issues.
</p>
        <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/FixUserEmails.zip">FixUserEmails.zip
(2.82 KB)</a>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=ccbe2f28-cfe2-4587-959a-fd00fb788583" />
      </div>
    </content>
  </entry>
  <entry>
    <title>SharePoint 2010 EU Cookie Law Notification Control</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/07/02/SharePoint2010EUCookieLawNotificationControl.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,9835554d-fd78-4bfd-b5de-d25c9537be85.aspx</id>
    <published>2012-07-02T22:08:01.3696645+01:00</published>
    <updated>2012-07-02T22:08:01.3696645+01:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
I’ve just released a SharePoint 2010 solution for external SharePoint sites that need
to comply with <a href="http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx" target="_blank">EU
notification rules</a>.
</p>
        <p>
The control is activated on each Web Application and displays a message at the top
of every page for each user until they click the confirm button. The confirm button
stores a cookie which is detected on further page views and does not display if its
detected.
</p>
        <p>
This control allows active consent rather than implied consent.
</p>
        <p>
Tested in SharePoint 2010 Foundation, 2010 Server, IE8/9, Chrome, Firefox.
</p>
        <p>
Download from CodePlex: <a href="http://sp2010cookieapproval.codeplex.com/" target="_blank">SharePoint
2010 Cookie Approval</a></p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/EU-Rule-Cookie-Notification-Control_109FB/TeamSiteTopPage_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="TeamSiteTopPage" border="0" alt="TeamSiteTopPage" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/EU-Rule-Cookie-Notification-Control_109FB/TeamSiteTopPage_thumb.png" width="644" height="169" />
          </a>
        </p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=9835554d-fd78-4bfd-b5de-d25c9537be85" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Case Sensitive MindF**k Part 1 SharePoint not indexing TWiki</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/02/22/CaseSensitiveMindFkPart1SharePointNotIndexingTWiki.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,dff8f41f-541a-41e2-a465-4d020ccea683.aspx</id>
    <published>2012-02-22T22:10:42.8041924+00:00</published>
    <updated>2012-02-22T22:10:42.8041924+00:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <category term="WTF" label="WTF" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,WTF.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So we’re setting up a crawl of a TWiki site as one source in a suite of content sources.
</p>
        <p>
So far so good, once the authentication was sorted we noticed a problem, only the
root Url of the site was getting crawled. 
</p>
        <p>
Various ideas were thrown around about nofollow and noindex attributes but we couldn’t
find anything wrong with our configuration and nothing seemed to fit the problem.
</p>
        <p>
I noticed that this particular TWiki installation was case sensitive to Urls by accident
(thought those days were gone, configurable apparently) and that got me thinking. 
</p>
        <p>
By kicking a crawl off i noticed that SharePoint was requesting lower case urls from
the Site for every link on the home page getting a 404 and stopping. 
</p>
        <p>
Ok penny drops but why is SharePoint sending a lower case url, well… this is by design
as part of the crawler’s normalization of urls (<a href="http://blogs.msdn.com/b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepoint-server-2010.aspx">http://blogs.msdn.com/b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepoint-server-2010.aspx</a>) 
</p>
        <p>
In 2010 if you’re setting up a crawl rule that checkbox you’ve ignored called Match
Case (badly named surely Preserve Url Casing would get the point across better) just
needs to be set and viola the crawler will preserve the case of Urls it requests.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=dff8f41f-541a-41e2-a465-4d020ccea683" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Fix: Azure Dev Environment not starting</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2011/10/13/FixAzureDevEnvironmentNotStarting.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,fc531b14-54c5-4996-9ede-8c0db734b0ec.aspx</id>
    <published>2011-10-13T13:43:36.1415665+01:00</published>
    <updated>2011-10-13T13:43:36.1415665+01:00</updated>
    <category term="Azure" label="Azure" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Azure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
So we have a development VM thats pretty fully loaded with software, Sharepoint 2010,
Project Server 2010 and CRM 2011. 
</p>
        <p>
For some reason the First Azure project on this machine refused to deploy to the local
development App Fabric. The deployment hung and never completed.
</p>
        <p>
 <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/Do%20You%20Want%20to%20Wait_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Do You Want to Wait" border="0" alt="Do You Want to Wait" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/Do%20You%20Want%20to%20Wait_thumb.png" width="244" height="101" /></a></p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/StartWindowsAzure_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="StartWindowsAzure" border="0" alt="StartWindowsAzure" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/StartWindowsAzure_thumb.png" width="244" height="76" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Nothing was posted in the event logs but there were items in the VS output screen
about failing to write to the logs. Nice.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogFiles_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="LogFiles" border="0" alt="LogFiles" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogFiles_thumb.png" width="244" height="13" />
          </a>
        </p>
        <p>
A search for those files found lots of Azure log folders in %localappdata%\dftmp
</p>
        <p>
 <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogfileLocation_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="LogfileLocation" border="0" alt="LogfileLocation" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogfileLocation_thumb.png" width="244" height="138" /></a></p>
        <p>
In DFAgentLogs and the DFAgent.log file I found this 
</p>
        <p>
          <font size="1">[2011/10/13, 10:46:12.145,  INFO, 00011572] There is already a
listener on IP endpoint 0.0.0.0:808.  Make sure that you are not trying to use
this endpoint multiple times in your application and that there are no other applications
listening on this endpoint. 
<br />
[2011/10/13, 10:46:12.639,  INFO, 00011572]    at System.ServiceModel.Channels.SocketConnectionListener.Listen() 
<br />
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen() 
<br />
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen() 
<br />
   at System.ServiceModel.Channels.TransportManager.Open..</font>
        </p>
        <p>
 
</p>
        <p>
Now we’re getting somewhere, the App Fabric Development Agent is trying to listen
on port 808 and failing as another process has this port in use
</p>
        <p>
A netstat –ano command shows the process id that is listening on that port 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/NetStat_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="NetStat" border="0" alt="NetStat" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/NetStat_thumb.png" width="244" height="46" />
          </a>
        </p>
        <p>
The Tasklist command tasklist /fi “PID eq 11400” shows that an exe call SMSVCHost.exe
is listening on port 808
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSvcHost_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SMSvcHost" border="0" alt="SMSvcHost" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSvcHost_thumb.png" width="244" height="32" />
          </a>
        </p>
        <p>
Thats the Net.TCP Port Sharing service. So the port sharing service is stopping a
port being used. Marvellous.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSVCHostService_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SMSVCHostService" border="0" alt="SMSVCHostService" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSVCHostService_thumb.png" width="217" height="244" />
          </a>
        </p>
        <p>
I’m not sure which of the installed software set that service to automatically start.
</p>
        <p>
After stopping the service and restarting the Development Fabric the deployment succeeded.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=fc531b14-54c5-4996-9ede-8c0db734b0ec" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Fix for Zune Error 80040154</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2011/10/01/FixForZuneError80040154.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,2ca64661-a8ec-486e-ba16-8dff71c0deb5.aspx</id>
    <published>2011-10-01T20:12:47.345+01:00</published>
    <updated>2011-10-01T20:12:47.3455421+01:00</updated>
    <category term="Zune" label="Zune" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Zune.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <br />
If you've installed Zune on a Server OS like Windows 2008 by running the zune-x64.msi
directly as shown by Rob Mensching<br /><a href="http://robmensching.com/blog/posts/2009/9/12/How-to-install-Zune-software-on-Windows-2008-R2">http://robmensching.com/blog/posts/2009/9/12/How-to-install-Zune-software-on-Windows-2008-R2</a> you
probably will get error 80040154 when checking for phone updates in Zune
</p>
        <p>
The error means a COM component is not registered, its looking for a component with
a CLSID of {31055FF4-9B90-42D6-9672-468E3ADE9583}
</p>
        <p>
To fix this in the Zune Packages directory (where you ran the Zune install from) run
zunewmdu-x64 (or zunewmdu-x86.msi) as Administrator and you should be able to update
your Windows 7 Phone
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=2ca64661-a8ec-486e-ba16-8dff71c0deb5" />
      </div>
    </content>
  </entry>
  <entry>
    <title>SPEndpointAddressNotFoundException error in Dashboard Designer</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2010/07/17/SPEndpointAddressNotFoundExceptionErrorInDashboardDesigner.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,25ce755a-61f2-4d4c-9a45-36a4874de89c.aspx</id>
    <published>2010-07-17T19:30:04.972+01:00</published>
    <updated>2010-07-17T19:30:04.972556+01:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <span lang="EN-GB">
          <p>
            <font size="2">
            </font> 
</p>
          <p>
When using PerformancePoint Designer in SharePoint 2010 and trying to add a new item
say a SQL Server connection you might get the error 'An Unexpected Error Occured.
An error has been logged for the Administrator'
</p>
          <p>
If you check the Event log on your client machine you should find a more detailed
but equally cryptic error.
</p>
          <p>
            <font size="1">An unexpected error occurred. Error 15568.</font>
          </p>
          <p>
            <font size="1">Exception details:</font>
          </p>
          <p>
            <font size="1">Microsoft.SharePoint.SPEndpointAddressNotFoundException: There are
no addresses available for this application.</font>
          </p>
          <p>
            <font size="1">at Microsoft.SharePoint.SPRoundRobinServiceLoadBalancer.BeginOperation()</font>
          </p>
          <p>
            <font size="1">at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.GetBalancerContext()</font>
          </p>
          <p>
            <font size="1">at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.ExecuteOnChannel(CodeBlock
codeBlock)</font>
          </p>
          <p>
            <font size="1">
            </font> 
</p>
          <p>
            <font size="2">First check in Central Administration check you have a PerformancePoint
Services application created.</font>
          </p>
          <p>
My problem was that although the services application was created the service instance
itself was not running. Goto Central Admin - System Settings - Manage Services on
Server and make sure the PerformancePoint service is started or start it youself.
</p>
          <p>
Why you are not given the option in the Services App to do this automatically
is a mystery to me. 
</p>
          <p>
 
</p>
          <p>
 
</p>
          <p>
 
</p>
        </span>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=25ce755a-61f2-4d4c-9a45-36a4874de89c" />
      </div>
    </content>
  </entry>
</feed>