<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.proworks.com/blog/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>ProWorks Web Design, Development, and Umbraco Blog</title>
    <link>https://www.proworks.com/blog/</link>
    <description>ProWorks</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">4527</guid>
      <link>https://www.proworks.com/blog/archive/encrypting-your-webconfig/</link>
      <title>Encrypting your web.config</title>
      <description>&lt;p&gt;&lt;strong&gt;The Problem:&lt;/strong&gt; We have a website which sends out automatic email notifications upon ordering an item. The problem is that the emails suddenly stopped.&lt;/p&gt;
&lt;p&gt;The Technologies: We are using Commerce 4 Umbraco as our Ecommerce system. We use Office 365 for our stmp email which Umbraco is configured to use.&lt;/p&gt;
&lt;p&gt; The Cause: We were using a non-primary account which counted as a separate account (&lt;a href="mailto:noreply@website.com"&gt;noreply@website.com&lt;/a&gt;). When we transitioned over to Office 365 we were given 15 accounts to use, but the 15 accounts given expired leaving us only 1 account for emailing. This mean the non-primary noreply account was prevented from authenticating.&lt;/p&gt;
&lt;p&gt;The Fix: Running the web under the main account credentials. The problem with this was that we would have to put a plaintext password in the web.config and that is a major security risk. The way to fix this was encrypt the web.config. It is an extremely simple process and is smart to do for all of your production websites.&lt;/p&gt;
&lt;p&gt;&lt;img style="width: 497px; height:360px;" src="https://www.proworks.com/media/1209/webconfig_497x360.jpg?width=497&amp;amp;height=360" alt="Encrypting Web.Config"&gt;&lt;/p&gt;
&lt;p&gt;TO ENCRYPT:&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pef &lt;a rel="noopener noreferrer" href="http://system.net/mailSettings/smtp" target="_blank"&gt;system.net/mailSettings/smtp&lt;/a&gt; c:\web\YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pef appSettings c:\web\ YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pef connectionStrings c:\web\ YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;TO DECRYPT:&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pdf &lt;a rel="noopener noreferrer" href="http://system.net/mailSettings/smtp" target="_blank"&gt;system.net/mailSettings/smtp&lt;/a&gt; c:\web\ YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pdf appSettings c:\web\ YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pdf connectionStrings c:\web\ YOUR_WEBSITE_DIRECTORY&lt;/p&gt;
&lt;p&gt;Running those commands will encrypt and decrypt the smtp, appSettings and connectionString adding another level of security to your website.&lt;/p&gt;</description>
      <pubDate>Sat, 09 Feb 2013 12:32:23 Z</pubDate>
      <a10:updated>2013-02-09T12:32:23Z</a10:updated>
    </item>
  </channel>
</rss>