Changing the Credentials for the SQL Database for iMonnit Enterprise

There may be an occasion where you need to change the credentials for the SQL database to which your Enterprise installation records data. Generally this would be a result of the SQL user credentials being changed and needing to be updated in Enterprise, or a need for directing Enterprise to send data to a different database. This article will provide information on modifying the Connection String your Enterprise installation uses to connect to your SQL database.

Summary of Steps

  1. Stop the Enterprise Wireless Gateway Server service
  • Launch the Services.msc program in Windows (you can generally search “services” in the Windows search. Note: you must have permissions to stop and start the service.
  • Locate the Enterprise Wireless Gateway Server service in the list.
  • Right click the Enterprise Wireless Gateway Server service.
  • Select Stop. Services.msc - Stop Enterprise Wireless Gateway Server service
  1. Stop the Enterprise Portal website in IIS.
  • Launch the IIS (Internet Information Services) program in Windows (you can generally search “iis” in Windows search. Note: you must have permissions to stop and start the service.
  • Expand COMPUTER NAME > Sites.
  • Click to highlight the Enterprise Portal.
  • In the Actions sidebar in the right side of the window, click Stop. IIS - Stop the Enterprise Portal Site
  1. Edit the Web.config file
  • On the server hosting iMonnit Enterprise site, navigate to the following directory using Explorer: C:inetpubwwwrootEnterprise .
  • Locate the file titled Web.config.
  • Using Notepad (or your preferred text editor), edit the contents of this file. Note: you will need Administrator privileges to edit and save this file to the “inetpub” directory.
  • Locate the “Connection String” entry in this file. It will be similar to the example below.
    <connectionStrings> <add name="SqlServer" connectionString="Server=DESKTOPSQLEXPRESS;Database=Enterprise;Uid=sa;Pwd=password;" /> </connectionStrings>
    “Server=” is the address of your SQL server
    “Database=” is the SQL Database name
    “Uid=” is the SQL user with read/write privileges
    “Pwd=” is the password for the SQL user.
  • Replace the existing credentials with the updated credentials.
  • Save the file to the same directory, C:inetpubwwwrootEnterprise .
  1. Edit the WirelessGatewayServer.exe.config file
  • On the same server hosting the iMonnit Enterprise site, navigate to the following directory using Explorer: C:inetpubwwwrootEnterpriseEnterprise Server .
  • Locate the file titled WirelessGatewayServer.exe.config.
  • Using Notepad (or your preferred text editor), edit the contents of this file. Note: you will need Administrator privileges to edit and save this file to the “inetpub” directory.
  • Locate the “Connection String” entry in this file. It will be similar to the example below.
    <connectionStrings> <add name="SqlServer" connectionString="Server=DESKTOPSQLEXPRESS;Database=Enterprise;Uid=sa;Pwd=password;" /> </connectionStrings>
  • Replace the existing credentials with the updated credentials.
  • Save the file to the same directory, C:inetpubwwwrootEnterpriseEnterprise Server .
  1. Start the Enterprise Portal Website in IIS.
  • Refer to step 2 of this guide - select Start in the Actions sidebar.
  1. Start the Enterprise Wireless Gateway Server service
  • Refer to step 1 of this guide - Select Start in the pop up menu.

Conclusion

After updating the configuration files and restarting the service and site, your Enterprise installation will have updated SQL database credentials. If you have related inquiries, feel free to contact Monnit Support.