Support‎ > ‎

Update Employee Portal from targeting .Net Framework 2 to .Net Framework 4

Starting from Employee Portal 10.11.131106, Employee Portal requires .Net Framework 4.0

If your existing Employee Portal Web Site is running .Net Framework 2.0, please follow these procedure to upgrade the web site to target .Net Framework version 4.

Step 1 - Update Application Pool
  1. Click Start, click Control Panel, click System Security, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. If you need to connect to a remote IIS Server, right click the Internet Information Services node and click the Connect... option.
  3. Type in the computer name for the remote IIS Server and credentials if necessary.
  4. Expand the server name that houses the web site or virtual directory to be updated.
  5. Expand Web Sites.
  6. Expand the Web Site to view the virtual directories under the web site.
  7. Right-click the virtual directory that you want to update to use ASP.NET 4.0 and select Properties to display the virtual directory properties dialog box. (For IIS 7.5, it is Manage Application->Advance Settings...)
  8. Click the ASP.NET tab of the virtual directory properties dialog. (For IIS 7.5, it is Application Pool)
  9. Click the dropdown option next to ASP.NET version: and change to 4.0 or later and click the OK button to apply changes.

If you cannot find ASP.NET v4.0, you can install .Net Framework 4.0 full version from


Step 2 - Modify Web.Config
The Web.Config file usually is stored under c:\inetpub\wwwroot\[Company Name] folder
You can open and edit with any text editor (e.g. Notepad)

1. Rename dbERProConnectionString to dbHRProConnectionString in the connectionStrings section
2. Add a targetFramework attribute to the compilation element in the system.web section
3. Add 

<httpRuntime requestValidationMode="2.0" />  
<globalization culture="en-US"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>

in the system.web section

Sample:

<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="dbHRProConnectionString" connectionString="Data Source=????;Initial Catalog=dbHRPro;Persist Security Info=True;User ID=sa;Password=nutechsql" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <system.net>
    <mailSettings>
      <smtp from="hr@hrpro.hk">
        <network host="smtp.???.com" port="25" defaultCredentials="false"/>
      </smtp>
    </mailSettings>
  </system.net>
  <appSettings>
    <!-- 
      <add key="AttendanceRecordNoOfPeriods" value="12"/>
      <add key="MainThemeColorDark" value="#1B6B00" />          
      <add key="MainThemeColor" value="#347235" />
      <add key="MainThemeColorLight" value="#B5EAAA" />
      <add key="MainThemeColorPale" value="#C3FDB8" />   
      <add key="EnableSSL" value="Yes" />      
      <add key="DataGridPageSize" value="15" />
      <add key="AttendanceRecordNoOfPeriods" value="3" />
      <add key="UpdateRosterStartPeriod" value="2" />
    <add key="UpdateRosterEndPeriod" value="-2" />
    -->
  </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>