how to encrypt web.config during web application deployment

Posted on 2009-05-01
Last Modified: 2013-11-14
I am developinga web application using ASP.ENT, VS 2008, Framework 3.5
I wan to encrypt my web.config at the end of application installation (Installer.Commit event).
How do I do this ?
Question by:vu3lmg
    LVL 11

    Expert Comment

    LVL 20

    Expert Comment

    by:Tapan Pattanaik
    LVL 1

    Accepted Solution

    OK guys I found the solution.
    I call Process.Start with parameters as under.
    Process.Start("C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis.exe",  "-pe \"connectionStrings\" -app /PARC -prov \"DataProtectionConfigurationProvider\"");

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now