Network Share for Attachments

This article describes how to use a network share for detached web files with Issuetrak 17.6 and later. This can be useful if you want to have file uploads to your Issuetrak site stored somewhere other than your web server. 


Detached Files Prep Work

  1. Determine the network share location where Issuetrak's detached files will be stored.
  2. Note the location's network path as two different strings:
    1. The network path exactly as you would enter it into Windows Explorer to browse to it. Example:
      \\server3\issuetrakfiles
       
    2. The network path with the backslashes escaped, for the purpose of being entered into JSON configuration files. Example:
      \\\\server3\\issuetrakfiles
       
  3. Ensure that the following detached folders exist at the network location noted in 2a. You can either create them manually or copy them from the existing Issuetrak web folder:
    1. Survey
    2. Reports
    3. KBAttachments
    4. Graphics
    5. DynamicFiles
    6. Billing
    7. Attachments
    8. Archives
  4. Ensure that the detached file location has the same permissions as their counterparts within the web folder.
  5. If you opted to create the folders manually, you must recursively copy the contents from each folder in your web folder to their counterparts at the network location.

Next, we will configure Issuetrak to utilize the network location.


Update Configuration Files

Perform the following steps to switch Issuetrak from the web folder to the network location for storing attachments. 

  1. Navigate to Issuetrak's web folder and open the file in the following path: /core/appsettings.release.json
    1. Modify the value for DETACHED_FILES_PATH (which is an empty string by default) so that it is the value from step 2b in the Prep Work section above.
    2. Save the file.
       
  2. Navigate to Issuetrak's web folder and open the file in the following path: /api/v2/appsettings.release.json
    1. Modify the value for DETACHED_FILES_PATH (which is an empty string by default) so that it is the value from step 2b in the Prep Work section above.
    2. Save the file.
       
  3. Navigate to Issuetrak's web folder and open the file in the following path: /services/IncomingEmail/appsettings.json
    1. Add "DETACHED_FILES_PATH" within the "FeatureFlags" section, with the value from step 2b in the Prep Work section above.
    2. Save the file.
       
  4. On the web server, navigate to the following path:
    C:\Program Files (x86)\Issuetrak\{version}\Services\Email\Outgoing\appsettings.json
    1. Add "DETACHED_FILES_PATH" within the "FeatureFlags" section, with the value from step 2b in the Prep Work section above.
    2. Save the file.
       
  5. Navigate to Issuetrak's web folder and open the file in the following path: /Scripts/Serverside/DetachedFilesPath.asp 
    1. Modify "GetDetachedFilesPath" so that it contains the value from step 2a in the Prep Work section above. 
    2. Save the file.
       
  6. Navigate to Issuetrak's web folder and open the file in the following path: /api/web.config
    1. Set the value for the two settings below to match the value from step 2a in the Prep Work section above.
      1. AttachmentsRootFilePath
      2. UserPhotoImagesRootFilePath
    2. Save the file.
       
  7. To apply the detached files configuration changes, you will need to stop and then start the Issuetrak site in IIS.

Test the attachment functionality and verify that files are being uploaded to the network location as they are supposed to be. 

Please reach out to Issuetrak Support if you need assistance with this.


Pre-17.6 Steps

This section describes how to set up a network share to be used for attachments for Issuetrak sites on release versions prior to 17.6. These steps will only work for Anonymous Authentication, and cannot be used if you are using Active Directory (AD) Single-Sign On (SSO), other Identity Management solutions will work correctly.

By default, "IUSR" is given "Modify" permissions on the Attachments folder, but this is not possible for a Network Share as the "IUSR" account does not exist on the Network (since it is a local account). The network share must be shared with a specific account.

It is recommended to transition your site to use Integrated Security if you are using a network share for your attachments. This is to streamline the setup process; and if the site is not using Integrated Security, these steps will need to be repeated for each later upgrade performed against the Issuetrak site.

To perform the below steps, you MUST be logged into the web server as a user that has admin rights on the web server and access to the network share you will be using.

If your site is using Integrated Security, it is strongly recommended that you use the same service account that the site is using for Integrated Security for this process. If you use the same service account, you will notice when going through the steps that the setting is already showing the configuration listed. This is to be expected and after verifying that it is configured as stated in this article, you can proceed to the next step.

Steps:

  1. Identify the user account you will be using to share the folder with (we recommend creating a domain account called "Issuetrak Service" if you do not already have a domain account that you plan to use).
    • If your site is using Integrated Security instead of SQL Authentication, we recommend sharing the folder with the same service account the site is using for Integrated Security. If you share the folder with the service account your site is using for Integrated Security, no additional service account will be required.
  2. On the network share, create a folder called Attachments.
  3. Share this folder with the user account identified in step 1.
  4. Once shared, give this user account Modify permissions on the folder.

Take note of the UNC path for the network share because we will need it in later steps.

  1. On the web server, inside IIS, locate your Issuetrak site in the Sites list.
  2. Right-click the Issuetrak site > Manage Application > Advanced Settings.
  3. Take note of the name of the Application Pool.
  4. Click OK.
  5. Expand your Issuetrak site in the Sites list if it is not already expanded.
  6. In the left pane, right-click on the Core folder under the Issuetrak site > Manage Application > Advanced Settings.
  7. Take note of the name of the application pool.
  8. Click OK.
  9. Click Application Pools in the left pane.
  10. Right-click the Application Pool identified in step 7 > then click Advanced Settings.
  11. Under Process Model, change the Identity to Custom account and set it to the user account identified in step 1.
  12. Click OK to save changes.
  13. Repeat steps 14 through 16 for the application pool identified in step 11.
  14. Expand/locate your Issuetrak site in the Sites list.
  15. Select the Issuetrak site, under IIS section, open Authentication.
  16. Verify Anonymous Authentication is enabled.
    • If not, please enable it by right-clicking it and selecting Enable.
  17. Right-click Anonymous Authentication > Edit.
  18. Select Application pool identity > OK.
  19. Right-click the Issuetrak site > Add Application.
  20. For Alias, enter in Attachments - this must be spelled EXACTLY since it needs to replace the existing Attachments folder.
  21. For Application pool, select the app pool used by your Issuetrak site (identified in Step 7).
  22. For Physical path, enter in the UNC path to the network share from step 2.

    For example: \\SERVER01\Attachments\
     
  23. Click Connect as and verify Application user is selected.
  24. Click OK to save changes.
  25. Select the newly created Attachments application, in the IIS section, double-click Authentication.
  26. Verify Anonymous Authentication is enabled.
    • If not, please enable it by right-clicking it and selecting Enable.
  27. Right-click Anonymous Authentication > Edit.
  28. Verify Application pool identity is selected.
    • If not, please select it and click OK.
  29. Select the newly created Attachments application, in the IIS section, double-click Modules.
  30. Right-click on the HttpModuleLoader and select Remove.
  31. Click Yes on the confirmation prompt.
  32. Log into the site and verify that you can add attachments and that they are saved to the network share.
  33. If necessary, copy all existing attachments from your web server over to your new network shared attachments folder.
  34. Verify that you are able to download attachments from issues.

You may need to modify additional permissions on your Issuetrak site now that you are no longer using "IUSR". Please refer to KB# 1578 to ensure all the necessary folders have the appropriate permissions using the account identified in Step 1 above.


Additional Configuration for Incoming Email (IEM)

The steps performed above will allow attachments to be added to Issues while logged into the site. If you are using (or planning to use) Incoming Email, some additional steps are required.

Steps:

  1. Open Task Scheduler on the web server.
  2. Locate the IEM scheduled task for the site.
    • Each Issuetrak site on that web server will have a separate scheduled task and the name will contain the Site Name.

For example, if your site is named Helpdesk, the task name will be:

Issuetrak Helpdesk IEM

  1. Right-click on the scheduled task and select Properties.
  2. Click the Actions tab.
  3. Click to highlight the first action listed.
  4. Click Edit.
  5. In the Add arguments field enter:

    <CORE_WEBCONFIG_FULL_LOCAL_PATH> <ATTACHMENTS_NETWORK_SHARE_UNC_PATH>
    • Replace <CORE_WEBCONFIG_FULL_LOCAL_PATH> with the full path to the web.config file in the Webfolder\Core folder
    • Replace <ATTACHMENTS_NETWORK_SHARE_UNC_PATH> with the same UNC path you entered in Step 20 of the previous process above.

The end result should look something like this:

C:\inetpub\wwwroot\helpdesk\core\web.config \\SERVER01\Attachments

  1. Click OK in the Edit Action window.
  2. Click to highlight the second action listed.
  3. Repeat steps 6 through 8.
  4. Click OK in the Properties window.