Skip to main content

IIS Change the key length for an SSL renewal

*** IIS 6 ***

When applying for an SSL certificate renewal and the old certificate uses a 512 bit key length you may receive the following error: "The CSR you submitted has a 512 bit key size. We do not allow SSL Web Server certificate issued with a CSR less than 1024 bits."

There is no way within IIS to change the key length but the workaround is as follows:

1. Create a new website under IIS. Make sure the website is stopped.
2. Edit the new site.
3. Select the "Directory Security" tab.
4. Click "Server Certificate"
5. Click "Next"
6. Select "Create a new certificate"
7. Click "Next"
8. Select "Prepare the request now, but send it later".
9. Click "Next"
10. Enter a name for the new request and select a bit length of 1024.
11. Click "Next".
12. Enter the organisation name and organisational unit for the website you are attempting to renew.
13. Click "Next".
14. Enter the exact domain name for the website you are attempting to renew.
15. Click "Next".
16. Enter the business country, state and city.
17. Click "Next".
18. Select a save location for the CSR.
19. Complete the wizard.
20. Submit the new CSR with your renewal request - this should be accepted.
21. When you receive the new certificate complete the renewal on the temporary site created in step 1.
22. Edit the main site that requires the renewed certificate.
23. Select the "Directory Security" tab.
24. Click "Server Certificate"
25. Click "Next".
26. Select "Replace the current certificate".
27. Click "Next".
28. Select the new certificate completed in step 21.
29. Click "Next" and complete the wizard.
30. Click "OK".
31. Delete the temporary site created in step 1.


huhu78 said…
useful trick - thx!

Popular posts from this blog

Ad hoc access to OLE DB provider has been denied

Using post SP2 SQL 7 (+ 2000 etc) attempting to access an OLEDB data source using OPENROWSET can produce the slightly spurious error: Ad hoc access to OLE DB provider 'MSDASQL' has been denied. You must access this provider through a linked server. In usual Microsoft style the message doesn't really mean what it says. From SQL 7 SP2 onwards MS by default blocked ad hoc query access with OLEDB. As the message suggests you could setup a linked server but that can be a real pain. Alternatively if you need ad hoc access server wide you could turn on ad hoc access for the SQL server you are using, explained in MS speak here: Ah, but it's not that simple. A little more witchcraft is required. The following registry settings can be used to enable ad hoc access: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers] "DisallowAdhocAccess"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLSer

Recover from corrupt SQL LDF transaction log file

Another favourite this month. A fault on one of our client's servers caused it to restart once every 10 minutes for 2 hours - the result was a corrupt LDF transaction log file for the main application database. It is surprisingly simple to recover from this situation: 1. Stop the SQL Server service 2. Copy the affected database (both LDF and MDF files) out of the main data folder. 3. Restart the SQL Server service 4. Create a new database of the same name and location as the database affected in step 2 - it is critical the filenames and paths are identical. 5. Stop the SQL Server service. 6. Copy the original MDF file (copied in step 2) in to replace the new MDF file created in step 4 7. Start the SQL Server service - the database will show as being suspect. 8. Now you need to recover the database, working from Query Analyser or SQL Management Studio: Use master go sp_configure 'allow updates', 1 reconfigure with override go select status from sysdatabases where name = '

Take website screenshot using ASP.NET

Utilising a hidden web browser control it is possible to take a screenshot of any website. The code shown below is based on an article at  (sorry the site now appears to be offline May 2012) but I have translated it from VB.NET to C# and will work in .NET so theoretically for any Windows or ASP.NET web project. using System; using System.Drawing; using System.Drawing.Imaging; using System.Windows.Forms; using System.Diagnostics; namespace WebsiteScreenshot { public class GetImage { private int s_Height; private int s_Width; private int f_Height; private int f_Width; private string myURL; public int ScreenHeight { get { return s_Height; } set { s_Height = value; } } public int ScreenWidth { get { return s_Width; } set { s_Width = value; } } public int ImageWidth { get { return f_Width; } set { f_Width = value; } } public int ImageHeight { get { return f_Height; } set { f_Height = value; } } public string Websit