<?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>Try, Catch... Finally.</title>
	<atom:link href="http://TryCatchFinally.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://TryCatchFinally.net</link>
	<description>Some .NET, some SQL, and whatever else</description>
	<lastBuildDate>Wed, 11 Jan 2012 03:21:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Crystal Reports &#8211; Security Plug-in Error</title>
		<link>http://TryCatchFinally.net/2012/01/crystal-reports-security-plug-in-error/</link>
		<comments>http://TryCatchFinally.net/2012/01/crystal-reports-security-plug-in-error/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 03:21:54 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[boe]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[crystal reports]]></category>
		<category><![CDATA[error message]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=97</guid>
		<description><![CDATA[After a recent installation of Crystal Reports Designer XI-R2, I attempted to connect to our Business Objects Enterprise installation to modify a report and was greeted with the error message: I'd been told that fixing this issue required a service pack to the Crystal Designer installation, but it was over 200MB and before I rolled [...]]]></description>
			<content:encoded><![CDATA[<p>After a recent installation of Crystal Reports Designer XI-R2, I attempted to connect to our Business Objects Enterprise installation to modify a report and was greeted with the error message:</p>
<pre class="brush: plain; title: ; notranslate">Security plugin error: An error has occurred in the plugin, but the plugin is unable to return a detailed error message.</pre>
<p>I'd been told that fixing this issue required a service pack to the Crystal Designer installation, but it was over 200MB and before I rolled it out, I decided to do a bit of searching. It turns out that this error is caused by a pair of missing DLL files on the local machine:</p>
<p>smcommonutil.dll<br />
smerrlog.dll </p>
<p>You can get these files from your Business Objects Enterprise CMS servers, since they have the full install already, from either of these locations:</p>
<p>(Install Drive):\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\<br />
(System Drive):\Windows\System32 (SysWow64 if you've installed it on an x64 system)</p>
<p>Grab those two files and copy them to the C:\Windows\System32 folder on your local workstation and you'll be good to go - now Crystal Designer connects to the BOE CMS without any complaints at all.</p>
<p>Thanks to <a href="http://www.forumtopics.com/busobj/viewtopic.php?p=469565">this forum post</a> for pointing me in the right direction!</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2012/01/crystal-reports-security-plug-in-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing SQL Server data file locations in clustered instance using service SIDs</title>
		<link>http://TryCatchFinally.net/2011/12/changing-sql-server-data-file-locations-in-clustered-instance-using-service-sids/</link>
		<comments>http://TryCatchFinally.net/2011/12/changing-sql-server-data-file-locations-in-clustered-instance-using-service-sids/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 04:30:37 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Windows Clustering]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[ntfs]]></category>
		<category><![CDATA[service account]]></category>
		<category><![CDATA[sid]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=163</guid>
		<description><![CDATA[Recently I added a second LUN to a clustered instance of SQL Server to isolate the logs files (and another for the TempDB) and I mounted them to an empty NTFS folder as I've done before, but when I started SQL Server, I recieved the following error: The error means that SQL Server doesn't have [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I added a second LUN to a clustered instance of SQL Server to isolate the logs files (and another for the TempDB) and I mounted them to an empty NTFS folder as I've done before, but when I started SQL Server, I recieved the following error:</p>
<pre class="brush: plain; title: ; notranslate">CREATE FILE encountered operating system error 5 (Access is denied.)
while attempting to open or create the physical file
'X:\MSSQL10_50.INSTANCENAME\TempDB\tempdb.mdf</pre>
<p>The error means that SQL Server doesn't have NTFS rights to the location of the TempDB, but when I tried to add those rights, the permissions weren't granted to the domain proxy account as I'd expected, but were instead granted to the service SID account, MSSQL$InstanceName. I attempted to grant the permissions to this account at the new location, but couldn't get it to resolve to an actual account. What finally worked was:</p>
<ol>
<li>In the permissions change dialog box, change the "Location" from the domain to the local machine (even though it's a cluster and your using a domain account to run the service)</li>
<li>In the text box, type "NT Service\MSSQL$INSTANCENAME" and click "Check Names"
</li>
</ol>
<p>Even though that appears to be a local account, it will resolve properly on all the cluster nodes involved. This step, as opposed to using the domain proxy account the service is running as, was necessary because (during the initial SQL Server setup process) I'd selected to use the proxy account SID to host permissions rather than a domain group. The better choice permissions-wise, but the source of some confusion!</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/12/changing-sql-server-data-file-locations-in-clustered-instance-using-service-sids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launching Microsoft File Transfer Manager</title>
		<link>http://TryCatchFinally.net/2011/12/launching-microsoft-file-transfer-manager/</link>
		<comments>http://TryCatchFinally.net/2011/12/launching-microsoft-file-transfer-manager/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 04:47:02 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[download manager]]></category>
		<category><![CDATA[msdn]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=169</guid>
		<description><![CDATA[In case you were in the middle of a download from MSDN or another Microsoft site that uses the transfer manager and you've accidentally closed it, you can find it at one of two locations: If you installed it from an MSI: x64 - C:\Program Files (x86)\Microsoft File Transfer Manager\TransferMgr.exe x86 - C:\Program Files\Microsoft File [...]]]></description>
			<content:encoded><![CDATA[<p>In case you were in the middle of a download from MSDN or another Microsoft site that uses the transfer manager and you've accidentally closed it, you can find it at one of two locations:</p>
<p>If you installed it from an MSI:<br />
x64 - C:\Program Files (x86)\Microsoft File Transfer Manager\TransferMgr.exe<br />
x86 - C:\Program Files\Microsoft File Transfer Manager\TransferMgr.exe</p>
<p>Downloaded automatically in IE (more likely):<br />
%SystemRoot%\Downloaded Program Files\TransferMgr.exe</p>
<p>Mine was hiding in that second location - if you download it directly in IE, it doesn't create a start menu icon, so you're not able to re-launch the tool unless you know the file location.</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/12/launching-microsoft-file-transfer-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with an exception: &#8220;An attempt was made to access a socket in a way forbidden by its access permissions&#8221;</title>
		<link>http://TryCatchFinally.net/2011/12/dealing-with-an-exception-an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissions/</link>
		<comments>http://TryCatchFinally.net/2011/12/dealing-with-an-exception-an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissions/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 16:45:25 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[windows server]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=160</guid>
		<description><![CDATA[I was attempting to bind a remoting listening to a particular port and kept receiving an exception when attempting to bind on the production Windows 2008 R2 server itself - it always worked fine on both my development box and our test server. Here's the exception: Though Googling gave some suggestions to run the process [...]]]></description>
			<content:encoded><![CDATA[<p>I was attempting to bind a remoting listening to a particular port and kept receiving an exception when attempting to bind on the production Windows 2008 R2 server itself - it always worked fine on both my development box and our test server. Here's the exception:</p>
<pre class="brush: plain; title: ; notranslate">Exception message: An attempt was made to access a socket in a way forbidden by its access permissions
Stack Trace:
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.TcpListener.Start(Int32 backlog)
   at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)</pre>
<p>Though Googling gave some suggestions to run the process as an administrator (no effect), the actual problem was that my process was trying to listen on a port that was already taken by another listener. Since the port was already in use, it couldn't bind and I received the exception. Stopping the other process resolved the issue immediately.</p>
<p>Not really a clear error message, since it really had nothing to do with permissions at all, but there you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/12/dealing-with-an-exception-an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clustering walkthrough for SQL Server 2008 on Windows 2008</title>
		<link>http://TryCatchFinally.net/2011/11/clustering-walkthrough-for-sql-server-2008-on-windows-2008/</link>
		<comments>http://TryCatchFinally.net/2011/11/clustering-walkthrough-for-sql-server-2008-on-windows-2008/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 15:46:29 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows Clustering]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[walkthrough]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=153</guid>
		<description><![CDATA[I recently stumbled across a great walk-through for clustering SQL Server on newer versions of Windows. It's really thorough - everything from setting up iSCSI (in this case, to simulate a shared disk when it's physically attached to one node - not ideal, but lets you test the walk-through), adding the required server roles, preparing [...]]]></description>
			<content:encoded><![CDATA[<p>I recently stumbled across a great walk-through for clustering SQL Server on newer versions of Windows. It's really thorough - everything from setting up iSCSI (in this case, to simulate a shared disk when it's physically attached to one node - not ideal, but lets you test the walk-through), adding the required server roles, preparing the servers, and then a walkthrough of every screen in the SQL installation process. Thanks to the writer of this awesome blog!</p>
<p><a href="http://dbperf.wordpress.com/2010/07/10/walkthrough-cluster-setup-sql-win-2008/">http://dbperf.wordpress.com/2010/07/10/walkthrough-cluster-setup-sql-win-2008/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/11/clustering-walkthrough-for-sql-server-2008-on-windows-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slow SQL Server queries over a linked server from Windows Server 2008</title>
		<link>http://TryCatchFinally.net/2011/09/slow-sql-server-queries-over-a-linked-server-from-windows-server-2008/</link>
		<comments>http://TryCatchFinally.net/2011/09/slow-sql-server-queries-over-a-linked-server-from-windows-server-2008/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 22:28:21 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows Clustering]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=133</guid>
		<description><![CDATA[We recently ran into an issue where linked server queries where sometimes taking significantly longer than they should have - queries that executed in under a second on the source server took two minutes when executed from a remote SQL Server over a linked server connection. We assumed it was something to do with our [...]]]></description>
			<content:encoded><![CDATA[<p>We recently ran into an issue where linked server queries where sometimes taking significantly longer than they should have - queries that executed in under a second on the source server took two minutes when executed from a remote SQL Server over a linked server connection. We assumed it was something to do with our Windows Failover Cluster network connections, but it was happening on non-clustered servers as well.</p>
<p>After some digging, we discovered that it happened when the source server was Windows Server 2008 (or 2008 R2), regardless of what OS the remote linked server was running, and the issue wasn't tied to any particular version of SQL Server. As it turns out, it related to everybody's least favorite network setting, TCP Auto-Tuning - disabling it on the affected source servers resolved the problem immediately, and the queries returned instantly again.</p>
<p>To remedy the situation, follow these steps:</p>
<ol>
<li>On the source SQL Server (the one executing the query, not the linked server), open an elevated command prompt (Right click on CMD.EXE and click "Run as Administrator")</li>
<li>To disable TCP Auto-tuning, run the following command:
<pre class="brush: plain; title: ; notranslate">netsh int tcp set global autotuninglevel=disabled</pre>
</li>
<li>To disable Windows Scaling Heuristics (another feature that can speed up clients, but is no good for servers), run:
<pre class="brush: plain; title: ; notranslate">netsh int tcp set heuristics disabled</pre>
</li>
<li>This will automatically take effect after Windows has the chance to refresh some network communications - you can either wait about an hour, or, if you'd prefer it take effect immediately, restart the SQL Instance. A reboot isn't necessary for this setting to take effect.</li>
</ol>
<p>I'm not sure why these settings are on by default for servers - they seem to speed up internet browsing and other client-type activities (though there's no shortage of complaints online about them grinding Windows Vista/7 clients to a halt as well), but can cause big problems on servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/09/slow-sql-server-queries-over-a-linked-server-from-windows-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get process ID for IIS App Pool</title>
		<link>http://TryCatchFinally.net/2011/07/get-process-id-for-iis-app-pool/</link>
		<comments>http://TryCatchFinally.net/2011/07/get-process-id-for-iis-app-pool/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 05:47:14 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[app pool]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[iis]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=93</guid>
		<description><![CDATA[Ever try to debug something on a machine with many w3wp.exe worker processes and weren’t sure which one was yours? There's a command line you can use to tell which is which: In IIS 6 (Windows XP/2003), type: It is located in C:\Windows\System32 which is almost always part of the PATH variable so you can [...]]]></description>
			<content:encoded><![CDATA[<p>Ever try to debug something on a machine with many w3wp.exe worker processes and weren’t sure which one was yours? There's a command line you can use to tell which is which:</p>
<p>In IIS 6 (Windows XP/2003), type:</p>
<pre class="brush: plain; title: ; notranslate">iisapp</pre>
<p>It is located in C:\Windows\System32 which is almost always part of the PATH variable so you can run the command from anywhere (like iisreset).</p>
<p>In IIS 7/7.5 (Windows Vista/7/2008/2008R2):</p>
<pre class="brush: plain; title: ; notranslate">appcmd list wp</pre>
<p>It is in C:\Windows\System32\Inetsrv\ which is not in the PATH variable by default so you can switch to that folder first and run the command.</p>
<p>If you're running multiple app pools on the server with the same proxy user account, now you can tell which one owns the application you're trying to debug!</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/07/get-process-id-for-iis-app-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roll your own lightweight SQL Server source control</title>
		<link>http://TryCatchFinally.net/2011/06/roll-your-own-lightweight-sql-server-source-control/</link>
		<comments>http://TryCatchFinally.net/2011/06/roll-your-own-lightweight-sql-server-source-control/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 19:04:06 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[walkthrough]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=99</guid>
		<description><![CDATA[I've wanted to implement some kind of source control on my SQL Servers before, but the only product available at the moment is Red-Gate's SQL Source Control, and I didn't need all the functionality it offered (or want to pay for it). Also, it relies on developers checking-in their changes, and that's prone to forgetfulness [...]]]></description>
			<content:encoded><![CDATA[<p>I've wanted to implement some kind of source control on my SQL Servers before, but the only product available at the moment is <a href="http://www.red-gate.com/products/sql-development/sql-source-control/">Red-Gate's SQL Source Control</a>, and I didn't need all the functionality it offered (or want to pay for it). Also, it relies on developers checking-in their changes, and that's prone to forgetfulness anyways, as well as leaving your database prone when somebody just changes something in production, without using their development tool - ouch. Sure,  you're protected against accidental drops, but what if somebody tweaks something in production without checking it back in? You're hosed.</p>
<p>All I wanted was a simple process that would run automatically, taking periodic snapshots of the database objects and recording any changes. I decided to roll my own - it's quick, simple, can be set up to run on a schedule, and automatically includes any new databases created on the server without any intervention.</p>
<p>This Stored Procedure goes through the following steps:</p>
<ol>
<li>If the Master.dbo.coSourceControl table (used to store the history) doesn't exist, it creates it</li>
<li>For each database on the server (so new databases are added automatically), it:
<ol>
<li>Grabs the text contents of all the user objects (not flagged as "IsMsShipped")</li>
<li>Compares the contents of each to the last known copy (if there is one)</li>
<li>If the object is new or has changed, add a new copy to the source control table in master</li>
</ol>
</li>
<li>Output the number of objects updated</li>
<li>Optionally, it could email somebody to tell them about the results, but it currently does not</li>
</ol>
<p>The history is kept in a single table - master.dbo.coSourceControl - which has the database it came from, the object_id, the object name, object contents, and the timestamp. Since it uses the object_id to track things, it will also record a name change in an object, even if the contents didn't change.</p>
<p>To implement it, just grab the script and run it in the master database - it will create the stored procedure coSourceControlRefresh. That's it - now either run it on demand, or you can schedule it. It will create the supporting table (if it's missing) and scan every database every time it's run. To see the history for an object, just do:</p>
<pre class="brush: sql; title: ; notranslate">  SELECT db_name(databaseid) as [Database],
         object_name(objectid) as [Object Name],
         SourceDate,
         ObjectText
    FROM master.dbo.coSourceControl
   WHERE object_name(objectid) LIKE '%The name of some object%'
ORDER BY SourceDate DESC</pre>
<p>Restoring a dropped or changed database object should be as simple as running the query above, grabbing the contents of ObjectText you're interested in, and then pasting it in another window and executing it. Bam - previous version of the object restored (and this stored proc should, the next time it runs, see that you've altered the object and record that there's a "new" version of it).</p>
<p>If you run it and like it - or don't like it - please leave a comment to let me know - nothing expected in return, but it's nice to know when people find it useful. I'm happy to make any enhancements you'd like to see. I hope you enjoy it and it's able to save you from the headache of a dropped database object to which you can't find the source!</p>
<p><a href="http://www.trycatchfinally.net/Downloads/Create Source Control Stored Procedure - 2005 and up.zip">Download the Source Control database script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/06/roll-your-own-lightweight-sql-server-source-control/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Generate an x509 certificate with an SHA256 signature hash</title>
		<link>http://TryCatchFinally.net/2011/05/generate-an-x509-certificate-with-an-sha256-signature-hash/</link>
		<comments>http://TryCatchFinally.net/2011/05/generate-an-x509-certificate-with-an-sha256-signature-hash/#comments</comments>
		<pubDate>Thu, 26 May 2011 16:31:50 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[sha256]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=91</guid>
		<description><![CDATA[When authenticating with a vendor using a custom webservice, the vendor requested that we use an x509 certificate with a 2048 byte key and an SHA256 hash (sometimes referred to as SHA2, though SHA2 actually refers to the group of hashes containing SHA256, 384, and 512). Since I'd used IIS to generate our certificate (IIS [...]]]></description>
			<content:encoded><![CDATA[<p>When authenticating with a vendor using a custom webservice, the vendor requested that we use an x509 certificate with a 2048 byte key and an SHA256 hash (sometimes referred to as SHA2, though SHA2 actually refers to the group of hashes containing SHA256, 384, and 512). Since I'd used IIS to generate our certificate (IIS will only generate a certificate using an SHA1 hash), and it involved quite a bit of research to get a certificate with an SHA256 signature hash on it, I wanted to detail the steps here:</p>
<ol>
<li>First, download and install OpenSSL from <a href="http://www.slproweb.com/products/Win32OpenSSL.html">Shining Light</a>. The "Light" version of the package will do, since you're only using basic functionality.</li>
<li>Generate your Certificate request (CSR), specifying an SHA256 signature hash
<ol>
<li>
<pre>openssl req -nodes -sha256 -newkey rsa:2048 -keyout C:\SomeFolder\PrivateKey.key -out C:\SomeFolder\CertificateRequest.csr</pre>
</li>
<li>You'll be prompted for a few certificate fields, including your state, company name, computer name on your certificate, etc. Enter these as they come up.</li>
</ol>
</li>
<li>This will generate two files - <strong>PrivateKey.key</strong> (which contains the un-encrypted version of your private key - protect this file, as somebody who obtains it along with your signed public key can impersonate you), and <strong>CertificateRequest.csr</strong> (your certificate signing request, which is not sensative).</li>
<li>Though this isn't required, if you want to confirm what you're entered in the CSR, you can view the details using another OpenSSL command line
<ol>
<li>
<pre>openssl req -in C:\SomeFolder\CertificateRequest.csr -text -noout</pre>
</li>
</ol>
</li>
<li>Now that you have your CSR, submit it to whatever signing authority you use - for us, it was Verisign, but there are any number of different CAs out there that can sign it.</li>
<li>Once your CA has signed the CSR, you'll get back either a binary p7b file (which we'll called <strong>SignedKeyFromCA.p7b</strong>) containing your certificate signed public key (and, possibly, the certificate chain your CA used as well), or either a binary or base64 CER file containing just your certificate. Whatever you receive back, you'll need to convert it to a Base64 CER (called <strong>SignedKeyFromCA.cer</strong> here), since that's what OpenSSL expects.</li>
<li>To combine your private key with the signed public key to create a certificate:
<ol>
<li>
<pre>openssl pkcs12 -export -in c:\Temp\SignedKeyFromCA.cer -inkey c:\temp\openssl.key -out SignedKeyPair.p12</pre>
</li>
<li>Since you're exporting your private key in this file, you'll be required to encrypt it with a password, which OpenSSL will prompt you for (twice).</li>
</ol>
</li>
<li>You've now got your signed key pair - SignedKeyPair.p12. You can either use this pkcs12 file in your code, or you can import in into your web server (assuming it supports SHA256 hashes). IIS7, for example, supports importing this certificate and using it for SSL, but just doesn't support generating a SHA2 CSR in the first place.</li>
</ol>
<p>Enjoy! If you have any issues, please feel free to post a comment and I'll do my best to answer it!</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/05/generate-an-x509-certificate-with-an-sha256-signature-hash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error TF255271 while upgrading TFS 2005 -&gt; 2010</title>
		<link>http://TryCatchFinally.net/2011/05/error-tf255271-while-upgrading-tfs-2005-2010/</link>
		<comments>http://TryCatchFinally.net/2011/05/error-tf255271-while-upgrading-tfs-2005-2010/#comments</comments>
		<pubDate>Thu, 12 May 2011 22:02:09 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[tfs]]></category>
		<category><![CDATA[upgrading]]></category>

		<guid isPermaLink="false">http://TryCatchFinally.net/?p=94</guid>
		<description><![CDATA[When upgrading TFS 2005 to TFS 2010 (using these instructions) and it worked great on my test computer, but when I went to migrate the production server, I received the following error: Warning Message: [2011-05-12 20:12:14Z] Servicing step Register Integration Database failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: AttachPreTFS2010Databases.TfsFramework) Warning Message: TF255271: The team project collection could [...]]]></description>
			<content:encoded><![CDATA[<p>When upgrading TFS 2005 to TFS 2010 (<a href="http://blogs.msdn.com/b/tfssetup/archive/2010/05/03/import-upgrade-upgrading-merging-a-tfs-2005-2008-instance-to-an-existing-tfs-2010-instance.aspx">using these instructions</a>) and it worked great on my test computer, but when I went to migrate the production server, I received the following error:</p>
<p style="padding-left: 30px;">Warning Message: [2011-05-12 20:12:14Z] Servicing step Register Integration Database failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: AttachPreTFS2010Databases.TfsFramework)<br />
<strong>Warning Message: TF255271: The team project collection could not be created</strong>. The number of steps before the completion of project creation is: 216. The number of steps completed before the failure was 10.</p>
<p>The error message doesn't give any detail at all, so I opened the log file and found this near the bottom:</p>
<p style="padding-left: 30px;">[Info   @20:12:19.133] [2011-05-12 20:12:14Z][Error] BisCreateSchema.sql Line 816 Error: Incorrect syntax near ','. (10 of 216)<br />
[Info   @20:12:19.133] [2011-05-12 20:12:14Z][Informational] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: BisCreateSchema.sql Line 816 Error: Incorrect syntax near ','.<br />
---&gt; <strong>System.Data.SqlClient.SqlException: Incorrect syntax near ','</strong>.</p>
<p>Try as I might, I couldn't find the SQL file it referred to, and Google wasn't much help either - however, it seemed that the SQL file wasn't actually to blame, especially since the same upgrade process had run flawlessly on my test server a few days earlier. Then I realized that my test server was SQL 2008 and my production server was SQL 2005 - while I didn't read specifically anywhere that this was a problem, SQL 2005 isn't supported by TFS 2010.</p>
<p><span style="color: #ff0000;">After much digging, the cause of the error ends up being that the TFS upgrade tool (and TFS 2010 in general) doesn't support SQL Server 2005. Upgrading the database server to SQL Server 2008 and re-running the process corrected the error and allowed us to complete the migration.</span></p>
<p>However, I've read that SQL 2008 support on TFS 2005 is patchy, so this also obliterates your rollback, if you were planning on one <img src='http://TryCatchFinally.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you get this error, hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://TryCatchFinally.net/2011/05/error-tf255271-while-upgrading-tfs-2005-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

