<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dev Team Assemble &#187; Security</title>
	<atom:link href="http://www.calvinirwin.net/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calvinirwin.net</link>
	<description>Evil beware!</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Windows 2008 Server GPO &#8211; Force Allow Remote Desktop Connections</title>
		<link>http://www.calvinirwin.net/2010/09/29/windows-2008-server-gpo-force-allow-remote-desktop-connections/</link>
		<comments>http://www.calvinirwin.net/2010/09/29/windows-2008-server-gpo-force-allow-remote-desktop-connections/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 18:00:07 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[GPO]]></category>
		<category><![CDATA[group policy]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[windows 2008 r2]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=260</guid>
		<description><![CDATA[Neat thing I figured out today...which I am 100% certain I will forget...to force allow remote desktop connections on a windows 2008 domain you need to set the following

Set windows Firewall to have a exception for the remote connection : computer &#62;&#62; admin templates &#62;&#62; network &#62;&#62; network connections &#62;&#62; windows firewall &#62;&#62; domain profile [...]]]></description>
			<content:encoded><![CDATA[<p>Neat thing I figured out today...which I am 100% certain I will forget...to force allow remote desktop connections on a windows 2008 domain you need to set the following</p>
<ol>
<li>Set windows Firewall to have a exception for the remote connection : computer &gt;&gt; admin templates &gt;&gt; network &gt;&gt; network connections &gt;&gt; windows firewall &gt;&gt; domain profile &gt;&gt; windows firewall: allow inbound remote desktop exceptions</li>
<li>Set the remote desktop services to allow connections: : computer &gt;&gt; admin templates &gt;&gt; windows components &gt;&gt; remote desktop services &gt;&gt; remote desktop session host &gt;&gt; connections &gt;&gt; Allow users to connect remotely using remote desktop services</li>
</ol>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/GPO' rel='tag' target='_self'>GPO</a>, <a class='technorati-link' href='http://technorati.com/tag/group+policy' rel='tag' target='_self'>group policy</a>, <a class='technorati-link' href='http://technorati.com/tag/remote+desktop' rel='tag' target='_self'>remote desktop</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a>, <a class='technorati-link' href='http://technorati.com/tag/windows+2008+r2' rel='tag' target='_self'>windows 2008 r2</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2010/09/29/windows-2008-server-gpo-force-allow-remote-desktop-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPException: SharePoint cannot find the user &#8211; SharePoint SPWeb.EnsureUser() and a Custom MembershipProvider</title>
		<link>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/</link>
		<comments>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 22:22:28 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MembershipProvider]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=90</guid>
		<description><![CDATA[Its seems that SharePoint has a knack for surprising me with seriously strange errors sometimes.  Usually at the core of the error there is a sound explanation as to why this is happening but nonetheless I am not pleased with the obscurity of them sometimes.  Case in point, while working on a Console [...]]]></description>
			<content:encoded><![CDATA[<p>Its seems that SharePoint has a knack for surprising me with seriously strange errors sometimes.  Usually at the core of the error there is a sound explanation as to why this is happening but nonetheless I am not pleased with the obscurity of them sometimes.  Case in point, while working on a Console application that would load FBA (Forms Based Authentication) users into a sharepoint sie collection and then create a site for each one (granting permissions and so on) I came across a very strange error - <strong>SPException: SharePoint cannot find the user.</strong></p>
<p>This kind of surprised me at first and I was wondering if somehow my <strong>CustomMembershipProvider</strong> setup stopped working on my portal site, but that was fine. So after hammering away at it for a while I came across a <a href="http://blog.mastykarz.nl/inconvenient-programmatically-sharepoint-users-spweb-ensureuser/">great article written by Waldek Mastykarz</a> on this exact problem.  After reading through his investigation it makes sense why it doesn't work in a console application but it works under the context of a SharePoint website. Essentially the web application has access to a context object and this has access to the providers node in your web.config file,  BUT the console application does not have this information available.  So when the SharePoint assemblies attempt to access this information they cannot because it does not exist.</p>
<p>The way around this is to create an HttpContext in your application before attempting to run <code>SPWeb.EnsureUser("blah")</code> like so:</p>
<pre>
<div class="code">
if (HttpContext.Current == null)
{
     HttpRequest request = new HttpRequest("", web.Url, "");
     HttpContext.Current = new HttpContext(request,
     new HttpResponse(new StringWriter()));
     HttpContext.Current.Items["HttpHandlerSPWeb"] = web;
}</div>
</pre>
<p>Then add the system.web/membership/providers node to your app.config file (which you may have to create in the project)..  Mine looks like so:</p>
<pre>
<div class="code">&lt;system.web&gt;
     &lt;membership&gt;
          &lt;providers&gt;
          &lt;add name="CustomSqlProvider" applicationName="/Portal"
            connectionStringName="sqlData"
            type="CustomProviders.CustomSqlMembershipProvider,
            CustomProviders, Version=1.0.0.0, Culture=neutral,
            PublicKeyToken=91a4fcd60b73a0e8" /&gt;
          &lt;/providers&gt;
     &lt;/membership&gt;
&lt;/system.web&gt;
&lt;connectionStrings&gt;
     &lt;add name="sqlData" connectionString="Data Source=sqlpd;
       Initial Catalog=PUsers; Integrated Security=True;
       MultipleActiveResultSets=True "
       providerName="System.Data.SqlClient" /&gt;
&lt;/connectionStrings&gt;</div>
</pre>
<p>After adding this information and running a few tests it started to work.  In fact it worked really well on my dev box...the only problem was it was a little intermittent on my production machine.  Which is funny because the provider on the site itself works just fine all the time but in order to get my console application working (the EnsureUser() portion) the site would require an IIS reset.  This is the one MAJOR stumbling block that I have yet to overcome...the only saving grace I have is that I can import the users manually into the system first using the UI and then run my console application that will load the sites and grant permissions to sites based on an external configuration file.</p>
<p>Many thanks to <a href="http://blog.mastykarz.nl"><cite>Waldek Mastykarz</cite></a> for all his help on this one so far...I know I will be coming back to this one in the near future but my head hurts a little and I need a beer.</p>
<p>Canadian SharePint event anyone?</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/MembershipProvider' rel='tag' target='_self'>MembershipProvider</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/08/05/sharepoint-spweb-ensureuser-and-thecustom-membership-provider/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Connecting to a SharePoint Standalone instance DB</title>
		<link>http://www.calvinirwin.net/2009/07/26/connecting-to-a-sharepoint-standalone-instance-db/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/connecting-to-a-sharepoint-standalone-instance-db/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 19:30:02 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[sql server 2005]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=37</guid>
		<description><![CDATA[Kudos to Scott Elliott a colleague of mine for putting this together...
Here is how I got my SQL Express to remotely respond to SQL Management Studio.
In SQL Server Configuration Manager:
Under SQL Server 2005 Network Configuration:
Protocols for

 Enable Shared Memory
 Enable Name Pipes
 Enable TCP/IP

Under SQL Server 2005 Servers

 SQL Server (ServerInstance) Properties

Log on as: Local [...]]]></description>
			<content:encoded><![CDATA[<p>Kudos to Scott Elliott a colleague of mine for putting this together...</p>
<p>Here is how I got my SQL Express to remotely respond to SQL Management Studio.</p>
<p>In SQL Server Configuration Manager:<br />
Under SQL Server 2005 Network Configuration:<br />
Protocols for</p>
<ul>
<li> Enable Shared Memory</li>
<li> Enable Name Pipes</li>
<li> Enable TCP/IP</li>
</ul>
<p>Under SQL Server 2005 Servers</p>
<ul>
<li> SQL Server (ServerInstance) Properties</li>
</ul>
<p>Log on as: Local System (have to restart)<br />
SQL Server Browser</p>
<ul>
<li> Log on as: Local System (may have to enable this service first in the Services MMC applet)</li>
</ul>
<p>And with that, you should be able to remotely connect! Hazzah!</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/SQL+Server' rel='tag' target='_self'>SQL Server</a>, <a class='technorati-link' href='http://technorati.com/tag/sql+server+2005' rel='tag' target='_self'>sql server 2005</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/connecting-to-a-sharepoint-standalone-instance-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>403 Access Denied on SharePoint SSP Search setting access attempt</title>
		<link>http://www.calvinirwin.net/2009/07/26/403-access-denied-on-sharepoint-ssp-search-setting-access-attempt/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/403-access-denied-on-sharepoint-ssp-search-setting-access-attempt/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 19:10:17 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=29</guid>
		<description><![CDATA[http://[your sspname here]/ssp/admin/_layouts/searchsspsettings.aspx
This problem has to do with an issue that comes up after you apply a hotfix to your servers. Essentially it enforces new security rules. To resolve it add the Sharepoint service account to the Box Administrators, WSS_ADMIN_WPG and WSS_RESTRICTED_WPG. Once this is done reset your IIS and you should be good to [...]]]></description>
			<content:encoded><![CDATA[<p>http://[your sspname here]/ssp/admin/_layouts/searchsspsettings.aspx</p>
<p>This problem has to do with an issue that comes up after you apply a hotfix to your servers. Essentially it enforces new security rules. To resolve it add the Sharepoint service account to the Box Administrators, WSS_ADMIN_WPG and WSS_RESTRICTED_WPG. Once this is done reset your IIS and you should be good to go.</p>
<p>Props to Søren Nielsen for the following post:<br />
<a href="http://soerennielsen.wordpress.com/2008/02/08/make-the-search-work-for-you/" target="_blank">http://soerennielsen.wordpress.com/2008/02/08/make-the-search-work-for-you/</a></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/search' rel='tag' target='_self'>search</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/403-access-denied-on-sharepoint-ssp-search-setting-access-attempt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Access Denied &#8211; Enabling Publishing Features in SharePoint</title>
		<link>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 18:53:26 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=20</guid>
		<description><![CDATA[This is kind of of a weird error and it didn't make sense to me at first (still doesn't really). The best workaround I could find on the net was to temporarily change the application to run in the application pool of the central admin site.
Steps:

Change the AppPool for the app to be the same [...]]]></description>
			<content:encoded><![CDATA[<p>This is kind of of a weird error and it didn't make sense to me at first (still doesn't really). The best workaround I could find on the net was to temporarily change the application to run in the application pool of the central admin site.</p>
<p>Steps:</p>
<ol>
<li>Change the AppPool for the app to be the same as the Central Admin site (Home Directory tab in IIS website properties).</li>
<li>Reset IIS or at the very least do an %systemroot%\system32\iisapp.vbs /a "apppoolname" /r (not sure if the iisapp.vbs method will work but cant see why not).</li>
<li>Activate the publishing infrastructure.</li>
<li>Set the app pool back to normal.</li>
<li>repeat step 2.</li>
</ol>
<p>Enjoy!</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/IIS' rel='tag' target='_self'>IIS</a>, <a class='technorati-link' href='http://technorati.com/tag/Security' rel='tag' target='_self'>Security</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/access-denied-enabling-publishing-features-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

