Prev: creat DBF in server 2005 with windows vista
Next: Deploying Multiple WCF Services In Same IIS Virtual Directory
From: Usman Jamil on 15 Dec 2009 09:32 Hi I'm a newbie to certificates and I could not find a newgroup related to this otherwise I would have posted this question there. If someone has worked on it, please help or guide me to a newsgroup where this could be answered. In IIS there's an option to manage web server certificates. The initial step is to generate a CSR. I have to do this programatically using C#. Searching on the net gave me hints to use XEnrol.dll (createPKCS10 method of CEnrollClass) which I tried and it worked fine. There is just one confusion that I cannot set the bit encryption in it. By default its 1024 but I need to set it to 2048 and 4096 just like it is configurable in IIS wizard. Can someone guide me how to set this using C#. There's a property named "GenKeyFlags" which is perhaps a solution to it, but I dont know what value to set for it. Any code snipped is appreciated. Regards Usman |