Friday, April 30, 2010

Stuff You (I) Should Know

The following is a list of APIs and tools which I consider the current state of the art in .NET development (though not exclusively .NET) and that I really should know a lot more about. This should pretty much be complete right now, though I have a nagging feeling I missed one.
The following list is not complete, won't be for some time and may require time travel to keep reasonably accurate - list of best practice advice/docs:
And some videos which I hope will be helpful:
Footnote: This needs reorganising into a list of tech, each with a list of links and FAQ/Quickstarts.

Monday, April 26, 2010

Wednesday, April 21, 2010

Error 107 ERR_SSL_PROTOCOL_ERROR

Needing to apply SSL to an existing website (on my Windows Server 2003 development machine) I recently opened the properties on the website (under IIS, Web Sites), clicked Directory Security and Server Certificate and chose to apply/replace the certificate from an existing site/certificate.

This did not have the required effect, when requesting the page in the browser:
  • Using HTTP://
    The page must be viewed over a secure channel
  • Using HTTPS://
    Error 107 (net::ERR_SSL_PROTOCOL_ERROR): Unknown error IIS
  • And occasionally
    Bad Request (Invalid Hostname)
Essentially, this is because I was trying to reuse an existing certificate on a web site that had a different name. The solution is basically to replace the certificate with a valid certificate either from a trusted Certificate Authority (CA) or to use the SelfSSL.exe.

All of this is documented here, the first link being how to use the SelfSSL to get the job done on a development box:
It is important to note that when applying SSL certificates, especially via SelfSSL, that you open the site's Properties dialog:
  • Click Web Site tab
  • Click Advanced button
  • Under Multiple SSL identifies for this Web site select the site's IP row
  • Click Edit button
  • From the IP address drop down menu select the IP address of that site
  • Click Ok, Ok, Ok
This associates the SSL certificate with the site's IP and ensures that there are no conflicts. Click the Help button in this window for more information.

Wednesday, April 14, 2010

Tuesday, April 06, 2010

Debugging SQL And The Fun Attached To That

Having come across this problem in Commerce Server 2002 recently:
Server Error in '/' Application.

Source:Microsoft OLE DB Provider for SQL ServerDescription:Incorrect syntax near '('.Source:Microsoft OLE DB Provider for SQL ServerDescription:Invalid object name 'MSCS_CatalogScratch.dbo.Catalog__Query__Results__for_spid__304'.Source:Microsoft OLE DB Provider for SQL ServerDescription:Invalid object name 'MSCS_CatalogScratch.dbo.Catalog__Query__Results__for_spid__304'.
I discovered that the stored procedure failing was called "ctlg_GetResults_for_SingleCatalog" but how to work out where?

This page came in useful: http://support.microsoft.com/kb/316549

Basically, it's stepping through SQL Stored Procedures in Visual Studio. The account you're accessing the DB requires execute permissions, etc, of course, but from there you should be able to step through the process just like code. Well, almost.

Friday, April 02, 2010

Always Check IIS

This is a lesson we all learn over and over again, I believe.

Recently trying to get the files in the MVC web app's directory '/Scripts/*' to be accessed I was constantly frustrated in not being able to load simple .js files, etc, in the browser page.

In this case, it was because Default Web Site in IIS already has a Scripts virtual directory setup. This, of course, does not behave as a normal subdirectory would and was stopping access to the files within it by the browser. This is expected, unless you've forgotten that fact because you've been working on WinSrv2k3 for too long...