Set IIS Configuration and Permissions for Remote File Attachments

If you wish to store your file attachments on a remote file server accessed via a UNC share (such as \\fileServer\attachments), additional configuration may be necessary.

If you try to upload a file attachment, you may encounter a Permission Denied error (from the attachment2.asp page).

This can happen because the anonymous IIS user does not have permission to access the remote file share, such as \\fileServer\attachments.

We want the user that is executing the web app to be able to write to that remote directory. Here's one way to set this up.

  1. Create a domain user that has access to this file share.
  2. Use this domain user as the application user for the web app.

File Uploads

Domain User

Lets say we have a user called mydomain\dovetail_app

File Server Config

On the \\fileServer, be sure that the domain user has read and write permissions to the attachments directory. This is best achieved by setting the NTFS permissions (as opposed to setting permissions on the share itself).

Web Server Config

We can then set the Identity of the Application Pool to this user. Right-click on the application pool, and choose Advanced Properties. Set the Identity to be the domain user.

Make sure your Dovetail Agent web application belongs to the application pool.

Click the Authentication icon for the application. Right-click on the Anonymous Authentication item. Set the Anonymous Authentication Credentials to be the Application Pool Identity.

Now, the app will run as the same user as the application pool, which is the domain user that we configured the app pool identity as earlier.

You should now be able to successfully upload file attachments.

File Downloads

When downloading a file attachment, the Dovetail Agent application transforms the physical file path into a URL. As part of the initial install steps for Dovetail Agent,as part of Configure the Web Server, an attachments virtual directory / application is setup.

This should be an application, not just a virtual directory. If necessary, right-click on the attachments virtual directory (within IIS Manager) and choose Convert to Application.

Physical Path

The physical path of this application will be the remote file share, such as \\fileServer\attachments.

Set the Application Pool

Be sure to add this application to the same Application Pool as Dovetail Agent (same steps as we did earlier for the Dovetail Agent application)

Set the Anonymous Credentials

Be sure to set the Anonymous Authentication Credentials to be the Application Pool Identity. (same as we did earlier for the Dovetail Agent application)

You should now be able to successfully download file attachments as well.

Additional information on IIS configuration and permissions for remote file attachments is available online.

See Also

Configure the Web Server

IIS6

IIS7

Next

Edit the fc.env File

Set IIS Configuration and Permissions for Remote File Attachments