• http://www.techneurons.com/career/
  • experienced programming consultants for hire !!!

    Contact Now

    C#.NET Support

    Encryption/Decryption of Connection String

    Posted by Anirudh Krishan on Mar 21, 2010
    we can encrypt connection string using

    aspnet_regiis -pef connectionString "C:...."

    and Decrypt using :

    aspnet_regiis -pdf connectionString "C:...."

    if i have encrypted my connection string by above command then can anyone decrypt the encrypted connection string using the other one command or it needs some permissions to decrypt.
    Replied by consultsarath on Mar 22, 2010
    <p>There are two different providers for this encryption and decryption - RSA and DPAPI. RSA is the default provider where DPAPI (Windows Data Protection API) is untransferrable.</p> <p>DPAPI keys are based on the Security Identifier (SID) of the logged on identity, and this is globally unique. This facility will only with Administratory access. As the DPAPI is totally based on a machine/user's private keys, it is not possible for a different user to decrypt the connectionString back to original. You can grant read access to different users, and especially to the user identity which is used by the web server or application pool. <strong>It is not possible to use connectionString encrypted on your local development machine to get decrypted on a remote web server. </strong></p> <p>Unlike DPAPI encryption, the RSA provider allows exporting of the private keys, which can be regenerated on a different machine and can be used to decypt the connectionString there. This provider is commonly used for this reason. The keys can be imported using the same aspnet_regiis utility and regenerated on the production server.</p> <p>In either cases, it is not possible for anybody to decrypt the encrypted connectionString without your administratory support.</p>
    We are experts in Cloud Computing Technologies. We can assist you to build high scalable business applications using Amazon Web Services (Amazon EC2, Amazon S3, Amazon SES, SNS, CloudFront), Windows Azure Platforms - Windows Azure and SQL Server Azure, Google App Engine using Python and Django Framework. We are Expert Programming Consultants available at affordable rates per hour. We work on several technologies - .NET, Python, Google App Engine, PHP, Windows Azure, Amazon Web Services ...