Support‎ > ‎

Web.Config settings for Employee Portal

The following settings may required to update during Employee Portal installation or upgrade. the Web.Config file usually is stored under c:\inetpub\wwwroot\[Company Name] folder.
 
You can open with any text editor (e.g. Notepad)
 
    The following settings need to be modified for new configuration
    <connectionStrings>
    <mailSettings>
     
 
Sample
 
<?xml version="1.0"?>
<!--
    Web.Config for WebLeave
   
    The following settings need to be modified for new configuration
    <connectionStrings>
    <mailSettings>
    
-->
<configuration>
 <connectionStrings>
  <add  name="dbHRProConnectionString"
    connectionString="Data Source=???;Initial Catalog=db???;Persist Security Info=True;User ID=sa;Password=???"
       providerName="System.Data.SqlClient" />
 </connectionStrings>
 <system.net>
  <mailSettings>
     <smtp from="???@
???.com">
       <network host="???.???.???.???" port="25" userName="???" password="???" defaultCredentials="true" />
     </smtp>
  </mailSettings>
 </system.net>
 <appSettings>
     <add key="DataGridPageSize" value="15" />
     <add key="EnableSSL" value="No" />
 </appSettings>
 <system.web>
     <compilation debug="true" 
targetFramework="4.0"/>
     <httpRuntime requestValidationMode="2.0" />
     <authentication mode="Windows" />
     <customErrors mode="Off" />
     <sessionState mode="InProc" cookieless="false" timeout="240"/>
     <globalization culture="en-US"/>
     <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
 </system.web>
</configuration>
 
 
Settings for gmail.com as smtp server

 <system.net>
    <mailSettings>
      <smtp from="hr@hrpro.hk">
        <network host="smtp.gmail.com" port="587" userName="hr@hrpro.hk" password="???" defaultCredentials="false"/>
      </smtp>
    </mailSettings>
  </system.net>
  <appSettings>
    <add key="EnableSSL" value="Yes" />      
  </appSettings> 


To define the Sender Name together with Email Address

<mailSettings>
      <smtp deliveryMethod="Network" from="HR Department &lt;hr@hrpro.hk&gt;">
            <network host="smtp.gmail.com" port="587" enableSsl="true" defaultCredentials="false" userName="hr@hrpro.hk" password="???" />
      </smtp>
    </mailSettings>

See also