Windows Server 2008 makes it very simple to create a self-signed certificate for your local server using IIS 7.
To create a Self-Singed Certificate, Open IIS 7 and go to the IIS server configuration section and Click on Server Certificates:
In the Right Action menu select Create Self-Signed Certificate
Give the Certificate a name and click OK
To add the certificate to your website edit the site binding and select the new certificate.