<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://cicoria.com/CS1/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shawn Cicoria - CedarLogic</title><link>http://cicoria.com/CS1/blogs/cedarlogic/default.aspx</link><description>Perspectives and Observations on Technology</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>RedX on Tfs Build Folder…</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/15/redx-on-tfs-build-folder.aspx</link><pubDate>Mon, 15 Mar 2010 20:58:01 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2856</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2856</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/15/redx-on-tfs-build-folder.aspx#comments</comments><description>&lt;p&gt;This has bitten several of our team members – can’t track down the cause, but to address &lt;/p&gt;  &lt;p&gt;1. Remove/Rename the C:\Users\[accountname]\AppData\Local\Microsoft\Team Foundation\2.0\Cache folder&lt;/p&gt;  &lt;p&gt;2. Run “devenv /resetuserdata&amp;quot;.&lt;/p&gt;  &lt;p&gt;Thanks to&lt;/p&gt;  &lt;p&gt;&lt;a title="http://codeclimber.net.nz/archive/2008/11/12/red-x-on-build-folder-on-team-explorer.aspx" href="http://codeclimber.net.nz/archive/2008/11/12/red-x-on-build-folder-on-team-explorer.aspx"&gt;http://codeclimber.net.nz/archive/2008/11/12/red-x-on-build-folder-on-team-explorer.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2856" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>Fixing my SQL Directory NTFS ACLS</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/12/fixing-my-sql-directory-ntfs-acls.aspx</link><pubDate>Fri, 12 Mar 2010 18:25:13 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2855</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2855</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/12/fixing-my-sql-directory-ntfs-acls.aspx#comments</comments><description>&lt;p&gt;I run my development server by boot to VHD (Windows Server 2008 R2 x64).&amp;#160; In that instance, I also have an attached VHD (I attach via script at boot up time using Task Scheduler).&amp;#160; That VHD I have my SQL instances installed.&lt;/p&gt;  &lt;p&gt;So, the other day, acting hasty, I chmod my ACLS – wow, what a day after that.&lt;/p&gt;  &lt;p&gt;So, in order to fix it I created this set of BAT commands that resets it back to operational state – not 100% of all what you get, I also didn’t want to run a “repair” – but, all operational again.&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;
setlocal 

SET Inst100Path=H:\Program Files\Microsoft SQL Server\100

REM GOTO SQLE

SET InstanceName=MSSQLSERVER
SET InstIdPath=H:\Program Files\Microsoft SQL Server\MSSQL10.%InstanceName%
SET Group=SQLServerMSSQLUser$SCICORIA-HV1$%InstanceName%
SET AgentGroup=SQLServerSQLAgentUser$SCICORIA-HV1$%InstanceName%

ICACLS &amp;quot;%InstIdPath%\MSSQL&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)FX
ICACLS &amp;quot;%InstIdPath%\MSSQL\backup&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\data&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\FTdata&amp;quot; /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\Jobs&amp;quot; /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\binn&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%InstIdPath%\MSSQL\Log&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F

ICACLS &amp;quot;%Inst100Path%&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%Inst100Path%\shared\Errordumps&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RXW



ICACLS &amp;quot;%InstIdPath%\MSSQL&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%InstIdPath%\MSSQL\binn&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\Log&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)F

ICACLS &amp;quot;%Inst100Path%&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)RX

REM THIS IS THE SQL EXPRESS INSTANCE

:SQLE

SET InstanceName=SQLEXPRESS
SET InstIdPath=H:\Program Files\Microsoft SQL Server\MSSQL10.%InstanceName%
SET Group=SQLServerMSSQLUser$SCICORIA-HV1$%InstanceName%
SET AgentGroup=SQLServerSQLAgentUser$SCICORIA-HV1$%InstanceName%



ICACLS &amp;quot;%InstIdPath%\MSSQL&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)FX
ICACLS &amp;quot;%InstIdPath%\MSSQL\backup&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\data&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\FTdata&amp;quot; /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\Jobs&amp;quot; /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\binn&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%InstIdPath%\MSSQL\Log&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)F

ICACLS &amp;quot;%Inst100Path%&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%Inst100Path%\shared\Errordumps&amp;quot;  /T /Q /grant &amp;quot;%Group%&amp;quot;:(OI)(CI)RXW



ICACLS &amp;quot;%InstIdPath%\MSSQL&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)RX
ICACLS &amp;quot;%InstIdPath%\MSSQL\binn&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)F
ICACLS &amp;quot;%InstIdPath%\MSSQL\Log&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)F

ICACLS &amp;quot;%Inst100Path%&amp;quot;  /T /Q /grant &amp;quot;%AgentGroup%&amp;quot;:(OI)(CI)RX


endlocal&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2855" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SQL/default.aspx">SQL</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>Copying Properties between 2 Different Types…</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/11/copying-properties-between-2-different-types.aspx</link><pubDate>Thu, 11 Mar 2010 17:11:02 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2854</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2854</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/03/11/copying-properties-between-2-different-types.aspx#comments</comments><description>&lt;p&gt;I’m not sure where I had seen some of this base code, but this comes up time &amp;amp; time again on projects.&lt;/p&gt;  &lt;p&gt;Here’s a little method that copies all the R/W properties (public) between 2 distinct class definitions:&lt;/p&gt;  &lt;p&gt;It’s called as follows:&lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true;"&gt;private static void Test1()
{
MyClass obj1 = new MyClass()
{
    Prop1 = &amp;quot;one&amp;quot;,
    Prop2 = &amp;quot;two&amp;quot;,
    Prop3 = 100
};

MyOtherClass obj2 = null;

obj2 = CopyClass(obj1);


Console.WriteLine(obj1);
Console.WriteLine(obj2);
}

namespace Space1
{
public class MyClass
{
public string Prop1 { get; set; }
public string Prop2 { get; set; }
public int Prop3 { get; set; }

public override string ToString()
{
var rv = string.Format(&amp;quot;MyClass: {0} Prop2: {1} Prop3 {2}&amp;quot;, Prop1, Prop2, Prop3);
return rv;
}
}
}

namespace Space2
{
public class MyOtherClass
{
public string Prop1 { get; set; }
public string Prop2 { get; set; }
public int Prop3 { get; set; }

public override string ToString()
{
var rv = string.Format(&amp;quot;MyOtherClass: {0} Prop2: {1} Prop3 {2}&amp;quot;, Prop1, Prop2, Prop3);
return rv;
}
}&lt;/pre&gt;

&lt;p&gt;Source of the method:&lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true;"&gt;/// 
/// Provides a Copy of Public fields between 2 distinct classes
/// 
/// Source class name
/// Target class name
/// Instance of type Source
/// An instance of type Target copying all public properties matching name from the Source.
public static T CopyClass&amp;lt;s  , T&amp;gt;(S source) where T : new()
{

    T target = default(T);
    BindingFlags flags = BindingFlags.Public | BindingFlags.Instance;

    if (source == null)
    {
        return (T)target;
    }

    if (target == null) target = new T();

    PropertyInfo[] objProperties = target.GetType().GetProperties(flags);

    foreach (PropertyInfo pi in objProperties)
    {
        string name = pi.Name;
        PropertyInfo sourceProp = source.GetType().GetProperty(name, flags);

        if (sourceProp == null)
        {
            throw new ApplicationException(string.Format(&amp;quot;CopyClass - object type {0} &amp;amp; {1} mismatch in property:{2}&amp;quot;, source.GetType(), target.GetType(), name));
        }
        if (pi.CanWrite &amp;amp;&amp;amp; sourceProp.CanRead)
        {
            object sourceValue = sourceProp.GetValue(source, null);
            pi.SetValue(target, sourceValue, null);
        }
        else
        {
            throw new ApplicationException(string.Format(&amp;quot;CopyClass - can&amp;#39;t read/write a property object types {0} &amp;amp; {1}  property:{2}&amp;quot;, source.GetType(), target.GetType(), name));
        }
    }

    return target;
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2854" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category></item><item><title>Need a simple LDAP server for Windows 7?</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/02/26/need-a-simple-ldap-server-for-windows-7.aspx</link><pubDate>Fri, 26 Feb 2010 22:00:56 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2853</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2853</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/02/26/need-a-simple-ldap-server-for-windows-7.aspx#comments</comments><description>&lt;p&gt;Well, in the past we had ADAM – which has migrated to AD LDS for Windows – under Vista, we really only had a hack to get it (ADAM) running on Vista.&lt;/p&gt;  &lt;p&gt;Now, we have it for both Server and Client – and it’s known as Active Directory Lightweight Directory Services – aka LDAP!! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=a45059af-47a8-4c96-afe3-93dab7b5b658"&gt;Download details: AD LDS for Windows7&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2853" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Win7/default.aspx">Win7</category></item><item><title>Collapse Project as a Visual Studio AddIn.</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/02/23/collapse-project-as-a-visual-studio-addin.aspx</link><pubDate>Tue, 23 Feb 2010 21:40:27 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2852</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2852</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/02/23/collapse-project-as-a-visual-studio-addin.aspx#comments</comments><description>&lt;p&gt;I’ve taken that macro that’s been passed around for years, and put it into a VS Addin.&lt;/p&gt;  &lt;p&gt;The following links for the full VS Solution and the MSI installer&lt;/p&gt;  &lt;p&gt;&lt;a title="http://cicoria.com/downloads/VsAuto/CollapseProjectsSln.zip" href="http://cicoria.com/downloads/VsAuto/CollapseProjectsSln.zip"&gt;http://cicoria.com/downloads/VsAuto/CollapseProjectsSln.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://cicoria.com/downloads/VsAuto/CollapseProjectsSetup7z.exe" href="http://cicoria.com/downloads/VsAuto/CollapseProjectsSetup7z.exe"&gt;http://cicoria.com/downloads/VsAuto/CollapseProjectsSetup7z.exe&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2852" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Deployment of Resource files (*.resx) to App_GlobalResources under SharePoint</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/31/deployment-of-resource-files-resx-to-app-globalresources-under-sharepoint.aspx</link><pubDate>Sun, 31 Jan 2010 18:44:57 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2850</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2850</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/31/deployment-of-resource-files-resx-to-app-globalresources-under-sharepoint.aspx#comments</comments><description>&lt;p&gt;This is a continuation from &lt;/p&gt;  &lt;p&gt;&lt;a href="http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/31/deployment-of-theme-and-resource-files-via-feature-timer-jobs.aspx"&gt;Deployment of Theme and Resource files&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Resource File Deployment (Resx)&lt;/p&gt;  &lt;p&gt;The second item was deploying Resource files to the App_GlobalResource directory present as a subdirectory under each IIS site for each SharePoint Web Application zone. Remember that you can have multiple IIS Sites for each “Logical” SharePoint Web Application.&lt;/p&gt;  &lt;p&gt;The other requirement we had was that each Web Application needed to have its own set of resource files and were to be deployed and scoped as a Web Application feature.&lt;/p&gt;  &lt;p&gt;The way the Timer job for resource was written was it would take a list of full file paths along with the target Web Application.&amp;#160; So, it’s the responsibility of the Feature code when it’s calling the CreateJob method to get that list of files, populate the string[] of files, and also obtain the target Web Application instance on the call.&amp;#160; All of these things are done in the feature activation code – which, I’ve left out of this sample just for brevity.&lt;/p&gt;  &lt;p&gt;The CreateJob method as mentioned is below:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;/// &amp;lt;summary&amp;gt;
/// Submit a App_GlobalResources copy job providing a list of files with full path
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;webApp&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
/// &amp;lt;param name=&amp;quot;files&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
public static void CreateJob(SPWebApplication webApp, string[] files)
{
    try
    {
        // Create new job
        GlobalResourceDeployJob grdj = new GlobalResourceDeployJob(webApp, files);
        grdj.SubmitJobNow(JOBNAME);
    }
    catch (Exception ex)
    {
        LogHelper.Log(&amp;quot;Failed to create job {0} - {1}&amp;quot;, JOBNAME, ex.Message);
        throw;
    }
}&lt;/pre&gt;

&lt;p&gt;Pretty straight forward, and the constructor is as follows:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;/// &amp;lt;summary&amp;gt;
/// Here as it&amp;#39;s required by the platform
/// &amp;lt;/summary&amp;gt;
public GlobalResourceDeployJob() : base() { }

/// &amp;lt;summary&amp;gt;
/// Primary constructor used
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;webApp&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
/// &amp;lt;param name=&amp;quot;files&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
public GlobalResourceDeployJob(SPWebApplication webApp, string[] files)
    : base(JOBNAME, webApp, null, SPJobLockType.None)
{
    _files = files;
}&lt;/pre&gt;

&lt;p&gt;Again, no big deal..&lt;/p&gt;

&lt;p&gt;The Execute override does most of the work as follows:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;/// &amp;lt;summary&amp;gt;
/// Main method to actualy do the copy of the files
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;targetInstanceId&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
public override void Execute(Guid targetInstanceId)
{
    try
    {
        this.Log(&amp;quot;starting job {0}&amp;quot;, JOBNAME);
        SPWebApplication webApp = this.Parent as SPWebApplication;

        if (webApp == null)
        {
            this.Log(&amp;quot;job {0} - invalide WebApp found (isNull)&amp;quot;, JOBNAME);

        }
        foreach (SPUrlZone zone in webApp.IisSettings.Keys)
        {
            // The settings of the IIS application to update
            SPIisSettings oSettings = webApp.IisSettings[zone];

            // Determine the destination path
            string destPath = Path.Combine(oSettings.Path.ToString(), &amp;quot;App_GlobalResources&amp;quot;);

            foreach (var filePath in _files)
            {
                string fileName = Path.GetFileName(filePath);
                if (File.Exists(filePath))
                    this.Log(&amp;quot;File {0} exists - will be overwriting&amp;quot;, fileName);

                if ( !File.Exists(filePath ))
                {
                    this.Log(&amp;quot;File {0} to copy doesn&amp;#39;t exist at the source - skipping&amp;quot;, filePath);
                    continue;
                }

                string destination = Path.Combine(destPath, fileName);
                this.Log(&amp;quot;Copying filePath {0} to  {1}&amp;quot;, filePath, destination);
                try
                {
                    File.Copy(filePath, destination, true);
                }
                catch (Exception ex)
                {
                    this.Log(&amp;quot;Err - couldn&amp;#39;t copy file {0} with exception {1}&amp;quot;, filePath, ex.Message);
                }
            }

            this.Log(&amp;quot;job {0} - For WebApp {1}: zone path: {2}&amp;quot;, JOBNAME, webApp.Name, oSettings.Path); 
        }

        this.Log(&amp;quot;ending job {0}&amp;quot;, JOBNAME);
    }
    catch (Exception ex)
    {
        this.Log(&amp;quot;Failed Job {0}  : {1}&amp;quot;, JOBNAME, ex.Message);
        throw;
    }
}&lt;/pre&gt;

&lt;p&gt;An finally, to make life a little easier, A couple of extension methods that i use:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;

namespace SharePointJobs
{
    public static class TimerJobExtensions
    {
        public static void SubmitJobNow(this SPJobDefinition jobDef, string jobName)
        {
            if (jobDef.Farm.TimerService.Instances.Count &amp;lt; 1)
            {
                jobDef.Log(&amp;quot;Could not find TimerService on this box&amp;quot;);
                throw new SPException(&amp;quot;Could not run job. Timer service not found.&amp;quot;);
            }

            foreach (SPJobDefinition job in  jobDef.Service.JobDefinitions)
                if (job.Name == jobName)
                {
                    jobDef.Log(&amp;quot;Found existing job {0}- deleteing&amp;quot;, jobName);
                    job.Delete();
                    jobDef.Log(&amp;quot;Done deleting existing job {0}&amp;quot;, jobName);
                }

            jobDef.Log(&amp;quot;Scheduling job {0}&amp;quot;, jobName);
            jobDef.Schedule = new SPOneTimeSchedule(DateTime.Now);
            jobDef.Update();

        }

        public static void Log(this SPJobDefinition jobDef, string message)
        {
            LogHelper.Log(jobDef.Name + &amp;quot;:&amp;quot; + message);
        }

        public static void Log(this SPJobDefinition jobDef, string message, params object[] args)
        {
            LogHelper.Log(jobDef.Name + &amp;quot;:&amp;quot; + message, args);
        }
    }

    
}&lt;/pre&gt;

&lt;p&gt;Again, the source for the sample is below, it just contains the Timer Jobs, no feature code (it’s simple to wire it up) and a WinForm app for submitting the jobs.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.cicoria.com/downloads/SharePointTimerJobSlnV3.zip"&gt;SharePointTimerJobSlnV3.zip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy…&lt;/p&gt;

&lt;p&gt;Again, thanks to the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://solutionizing.net/2008/07/09/updating-spthemesxml-through-a-feature/"&gt;http://solutionizing.net/2008/07/09/updating-spthemesxml-through-a-feature/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/"&gt;http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://alonsorobles.com/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/"&gt;http://alonsorobles.com/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to Joe McPeak, Ketan Shah for feedback, discussions…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2850" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Deployment of Theme and Resource files via Feature / Timer Jobs</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/31/deployment-of-theme-and-resource-files-via-feature-timer-jobs.aspx</link><pubDate>Sun, 31 Jan 2010 18:32:24 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2849</guid><dc:creator>cicorias</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2849</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/31/deployment-of-theme-and-resource-files-via-feature-timer-jobs.aspx#comments</comments><description>&lt;p&gt;Recently, we had a deployment scenario where we needed to deploy a custom theme and some resource files (resx) to the Farm and the Web Application zones respectively.&lt;/p&gt;  &lt;h3&gt;Theme Deployment via Feature / Timer Job&lt;/h3&gt;  &lt;p&gt;For the first feature, deployment of a theme, we initially went down the path assuming that we could scope the feature at Farm, and SharePoint would call the FeatureInstalled method in our Feature Receiver. Unfortunately, this all worked in development on our single machine environments. When it came time to deploy to a multi-server SharePoint environment we found that the FeatureInstalled event NEVER fired on all machines; however, the FeatureDeactivating and FeatureUninstalling fired every time when we de-activated/retracted the solution respectively. Even the FeatureActivated didn’t fire on all machines.&lt;/p&gt;  &lt;p&gt;While I’ve been told and seen many instances on blogs and internal messages that FeatureInstalled should be firing on all the machines, I just never saw it happen (I had added lots of logging and saw nothing in the ULS logs) – this was tried on a couple of Farms. &lt;/p&gt;  &lt;p&gt;So, in comes the timer job. The more I picked apart how jobs are created in the SharePoint timer jobs, the more it was evident that was the only solution that would be reliable and this issue could be put to bed.&lt;/p&gt;  &lt;p&gt;So, the feature definition is scoped to Farm, and pointing to a simple Feature Receiver that on Activation:&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;
&amp;lt;Feature xmlns=&amp;quot;http://schemas.microsoft.com/sharepoint/&amp;quot;
         Id=&amp;quot;604C0C13-D59B-4cd4-BCD2-A90F8AF2266C&amp;quot;
         SolutionId=&amp;quot;db6b8735-a4a0-47dc-a012-64e85373f150&amp;quot;
         Title=&amp;quot;Theme to deploy&amp;quot;
         Description=&amp;quot;Provides deployment of Theme to the Farm&amp;quot;
         Hidden=&amp;quot;FALSE&amp;quot;
         ActivateOnDefault=&amp;quot;FALSE&amp;quot;
         Scope=&amp;quot;Farm&amp;quot;
         ReceiverAssembly=&amp;quot;...&amp;quot;
         ReceiverClass =&amp;quot;....&amp;quot;
         Version=&amp;quot;1.0.0.0&amp;quot;&amp;gt;

  &amp;lt;Properties&amp;gt;
    &amp;lt;Property Key=&amp;quot;TemplateId&amp;quot; Value=&amp;quot;THEMESAMPLE&amp;quot; /&amp;gt;
    &amp;lt;Property Key=&amp;quot;DisplayName&amp;quot; Value=&amp;quot;Theme Sample&amp;quot;/&amp;gt;
    &amp;lt;Property Key=&amp;quot;Description&amp;quot; Value=&amp;quot;Theme Sample&amp;quot;/&amp;gt;
    &amp;lt;Property Key=&amp;quot;Thumbnail&amp;quot; Value=&amp;quot;images/thwheat.gif&amp;quot;/&amp;gt;
    &amp;lt;Property Key=&amp;quot;Preview&amp;quot; Value=&amp;quot;images/thwheat.gif&amp;quot;/&amp;gt;
  &amp;lt;/Properties&amp;gt;
&amp;lt;/Feature&amp;gt;&lt;/pre&gt;

&lt;p&gt;The FeatureActivated method just creates a custom type that contains the properties, then makes a call into the custom timer job’s static method to CreateJob, which is as follow:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;/// &amp;lt;summary&amp;gt;
/// Call this to create the job - set the properties as required
/// If you want to delete (remove) the theme setting from the SPTHEMES.xml file pass in 
/// delete == true and the TemplateID
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;jobProperties&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
public static void CreateJob(ThemeDeploymentJobProperties jobProperties)
{
    LogHelper.Log(&amp;quot;creating job {0}&amp;quot;, JOBNAME);
    SPWebService wsvc = SPFarm.Local.Services.GetValue&amp;lt;SPWebService&amp;gt;();

    foreach (SPServer server in SPFarm.Local.Servers)
    {
        switch (server.Role)
        {
            case SPServerRole.Application:
            case SPServerRole.SingleServer:
            case SPServerRole.WebFrontEnd:
                LogHelper.Log(&amp;quot;submitting job {0} for server {1}&amp;quot;, JOBNAME, server.Name);
                ThemeDeploymentJob job = new ThemeDeploymentJob(wsvc, jobProperties);
                job.SubmitJobNow(JOBNAME);
                break;
            default:
                break;
        }
    }
    LogHelper.Log(&amp;quot;done creating job {0}&amp;quot;, JOBNAME);
}&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The key to the above is getting the Web Service (which is present on any machine that has the Web Front End role) and use that in the base type for SPJobDefinition’s constructor, as shown below.&amp;#160; Also, submitting the job for each server – this actually assumes that the service is present on all machines in the farm, and generally that’s what / how I configure a Farm and recommend that approach.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public ThemeDeploymentJob() : base() { }

public ThemeDeploymentJob(SPWebService webService, ThemeDeploymentJobProperties properties)
    : base(JOBNAME, webService, null, SPJobLockType.None)
{
    SetProperties(properties);
}&lt;/pre&gt;

&lt;p&gt;The rest of the code, and and much inspiration comes from the following samples, etc.. &lt;/p&gt;

&lt;p&gt;&lt;a title="http://solutionizing.net/2008/07/09/updating-spthemesxml-through-a-feature/" href="http://solutionizing.net/2008/07/09/updating-spthemesxml-through-a-feature/"&gt;http://solutionizing.net/2008/07/09/updating-spthemesxml-through-a-feature/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/" href="http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/"&gt;http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://alonsorobles.com/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/" href="http://alonsorobles.com/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/"&gt;http://alonsorobles.com/2008/06/26/packaging-branding-and-themes-for-deployment-in-sharepoint-environments/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next post – Resource File Deployment (Resx) to the App_GlobalResources path…\&lt;/p&gt;

&lt;p&gt;Thanks to Joe McPeak, Ketan Shah for feedback, discussions…&lt;/p&gt;

&lt;p&gt;Full source to Timer Jobs and WinForm application for job submission here: &lt;/p&gt;

&lt;p&gt;&lt;a&gt;SharePointTimerJobSlnV3.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2849" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Learning another language…</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/28/learning-another-language.aspx</link><pubDate>Fri, 29 Jan 2010 01:27:29 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2848</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2848</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/28/learning-another-language.aspx#comments</comments><description>&lt;p&gt;We’ve been bombarded by Rosetta Stone commercials, magazine adds, and airport kiosks.&lt;/p&gt;  &lt;p&gt;I can’t say I picked up much from High School Spanish – in fact, mostly picked it up pickin peaches on a farm.&lt;/p&gt;  &lt;p&gt;Here’s a place you can get your feet wet for free… &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.livemocha.com/sihp"&gt;Livemocha: Language Learning with Livemocha | Learn a Language Online - Free!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2848" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Non-Tech/default.aspx">Non-Tech</category></item><item><title>No, your local admin account is NOT a SQL sysadmin – automatically</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/25/no-your-local-admin-account-is-not-a-sql-sysadmin-automatically.aspx</link><pubDate>Mon, 25 Jan 2010 15:36:47 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2847</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2847</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/25/no-your-local-admin-account-is-not-a-sql-sysadmin-automatically.aspx#comments</comments><description>&lt;p&gt;There have been many times that I’ve been handed a SQL instance that doesn’t allow me to do much with it even though the IT Admin for the machine have indicated they’ve done the install and your AD account is part of the Local Admin group.&lt;/p&gt;  &lt;p&gt;By default, in SQL 2008 local admin’s are not part of the sysadmin role – unless you’re running in single user mode.&lt;/p&gt;  &lt;p&gt;So, this article has a quick HOWTO on getting access back so you can go on your merry sysadmin way…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://technet.microsoft.com/en-us/library/dd207004.aspx" href="http://technet.microsoft.com/en-us/library/dd207004.aspx"&gt;http://technet.microsoft.com/en-us/library/dd207004.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The trick is, restart with the “-m;” parameter, make the change, the change it back (don’t forget that part).&amp;#160; Also, make sure all the other services aren’t running when you need to make this change, otherwise, they connect as THE single user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2847" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SQL/default.aspx">SQL</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Infrastructure/default.aspx">Infrastructure</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>How about an upgrade  - and don’t turn off Custom Errors..</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/24/how-about-an-upgrade-and-don-t-turn-off-custom-errors.aspx</link><pubDate>Sun, 24 Jan 2010 17:11:11 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2846</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2846</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/24/how-about-an-upgrade-and-don-t-turn-off-custom-errors.aspx#comments</comments><description>&lt;p&gt;Here I am just doing some banking and low and behold the bank I work with seems to be rolling out some “Pilot” stuff.&lt;/p&gt;  &lt;p&gt;From the error below, I quickly determine that they’re way overdue for moving to a later version of the Framework (I mean 1.1 come on!!!).&lt;/p&gt;  &lt;p&gt;The second thing is, why the heck aren’t you trapping these errors instead of giving me the “debug” mode view that only a developer should see!!&amp;#160; And before you write your web.config, at least make sure it’s XML compliant..&lt;/p&gt;  &lt;p&gt;How do you get the amateurs out of this business…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://cicoria.com/CS1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_4DABABB7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://cicoria.com/CS1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_679F6BD9.png" width="244" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2846" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item><item><title>I’m with COCO….</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/13/i-m-with-coco.aspx</link><pubDate>Wed, 13 Jan 2010 23:32:21 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2845</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2845</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/13/i-m-with-coco.aspx#comments</comments><description>&lt;p&gt;Definitely a surprise to hear that NBC would even consider all the late night shuffle after all the crap he’s had to wait for.&amp;#160; In support of Conan O’Brien…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.facebook.com/imwithcoco" href="http://www.facebook.com/imwithcoco"&gt;http://www.facebook.com/imwithcoco&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2845" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Non-Tech/default.aspx">Non-Tech</category></item><item><title>Don’t get caught with long Account Names!!</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/07/don-t-get-caught-with-long-account-names.aspx</link><pubDate>Thu, 07 Jan 2010 14:27:47 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2844</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2844</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2010/01/07/don-t-get-caught-with-long-account-names.aspx#comments</comments><description>&lt;p&gt;This has bitten me a couple of times.&amp;#160; &lt;/p&gt;  &lt;p&gt;This error surfaced yesterday when running a scripted install with psconfig.exe – the error that appears in the log is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;LookupAccountName failed to get the SID for account &amp;lt;domain&amp;gt;\LONG AC NAME &amp;gt; 20 chars&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When setting up SharePoint, we usually have a bunch of service accounts that generally are setup by different teams that manage the Active Directory accounts – well, that’s how it should work, but that’s another story.&lt;/p&gt;  &lt;p&gt;Many times organizations will have naming standards.&amp;#160; These naming standards, well, that’s up the the organization and frankly I don’t always agree with them given the ability to have containers in LDAP/AD, but that’s a long discussion.&lt;/p&gt;  &lt;p&gt;Sometimes (actually many times) these standards generate long account names.&amp;#160; Can be 20+ characters or more.&amp;#160; The thing is, when you setup an account in AD, it will truncate the “samAccountName” attribute for the user object based upon the Distinguished Name of the account.&amp;#160; So, it usually chops off the end of the string.&amp;#160; I’m not quite sure what it does if if finds a collision with an existing samAccountName and if it has some algorithm to generate a unique on the fly version that doesn’t collide – not my problem…&lt;/p&gt;  &lt;p&gt;So, what you just need to do is get the real samAccountName from AD and rerun your script, command, etc. with the corrected &amp;lt;domain&amp;gt;\samAccountName parameter and all is good!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2844" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Active+Directory/default.aspx">Active Directory</category></item><item><title>What Identity with IIS7 and ApplicationPoolIdentity?</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/24/what-identity-with-iis7-and-apppoolidentity.aspx</link><pubDate>Thu, 24 Dec 2009 18:13:10 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2843</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2843</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/24/what-identity-with-iis7-and-apppoolidentity.aspx#comments</comments><description>&lt;p&gt;With IIS7, we have a little bit more isolation with AppPool Identities &lt;/p&gt;  &lt;p&gt;For example, if you’re using the the DefaultAppPool, if you need to assign permissions to NTFS, SQL, etc., what you’d use instead is as follows:&lt;/p&gt;  &lt;p&gt;IIS APPPOOL\DefaultAppPool&lt;/p&gt;  &lt;p&gt;Where “DefaultAppPool” ends up being the name of your AppPool as shown in IIS Manager…&lt;/p&gt;  &lt;p&gt;That is if you’ve set the identity to the “ApplicationPoolIdentity” instead of something else, such as Network Service, Local System, or something other…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2843" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Infrastructure/default.aspx">Infrastructure</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Win2008/default.aspx">Win2008</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Wildcard Certificates and IIS7</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/23/wildcard-certificates-and-iis7.aspx</link><pubDate>Wed, 23 Dec 2009 21:28:47 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2842</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2842</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/23/wildcard-certificates-and-iis7.aspx#comments</comments><description>&lt;p&gt;Let’s face it, during development, managing all the certificates if you’re doing anything with validating SSL/TLS traffic is a pain.&lt;/p&gt;  &lt;p&gt;Now with Windows Identity Foundation (fka Geneva) we really have to get crackin on getting used to managing certificates, setting up SSL sites, etc.&lt;/p&gt;  &lt;p&gt;So, here’s great post on setting up IIS7 to use wildcard certificates…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blog.mikeobrien.net/PermaLink,guid,12d9628c-a350-4f7b-a573-9d05429b54e8.aspx" href="http://blog.mikeobrien.net/PermaLink,guid,12d9628c-a350-4f7b-a573-9d05429b54e8.aspx"&gt;http://blog.mikeobrien.net/PermaLink,guid,12d9628c-a350-4f7b-a573-9d05429b54e8.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This gives you 1 certificate rooted at some common domain (eg.&amp;#160;&amp;#160;&amp;#160; mydev.local) where all sites would be site1.mydev.local, site2.mydev.local, etc.&amp;#160; The CN in the certificate ends up being *.mydev.local – just wire up in your hosts file (..\drivers\etc\hosts) and you’re golden…&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2842" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Identity/default.aspx">Identity</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Make sure you copy the correct web.config…</title><link>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/16/make-sure-you-copy-the-correct-web-config.aspx</link><pubDate>Wed, 16 Dec 2009 16:58:10 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2841</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://cicoria.com/CS1/blogs/cedarlogic/rsscomments.aspx?PostID=2841</wfw:commentRss><comments>http://cicoria.com/CS1/blogs/cedarlogic/archive/2009/12/16/make-sure-you-copy-the-correct-web-config.aspx#comments</comments><description>&lt;p&gt;During an installation issue, a client followed the TechNet article (&lt;a title="http://technet.microsoft.com/en-us/library/cc298447.aspx" href="http://technet.microsoft.com/en-us/library/cc298447.aspx"&gt;http://technet.microsoft.com/en-us/library/cc298447.aspx&lt;/a&gt;) and those instructions are misleading.&lt;/p&gt;  &lt;p&gt;It indicates to copy the “web.config” to the Layouts directory – what if fails to specify is it should be the “layoutsweb.config” file instead.&lt;/p&gt;  &lt;p&gt;While following the article does get you passed the issue that brought you there in the first place, you eventually end up with issues on provisioned sites that reference anything in _layouts are there are sections “&amp;lt;system.web&amp;gt;” that don’t make sense in a IIS path.&lt;/p&gt;  &lt;p&gt;Just recopying that correct config file fixes all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/CS1/aggbug.aspx?PostID=2841" width="1" height="1"&gt;</description><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://cicoria.com/CS1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category></item></channel></rss>