Supporting shared content
Use the <mrSharedRef> tag in templates to reference external files that are shared across projects, such as JavaScript frameworks used to support custom controls, or large media files.
The
<mrSharedRef> tag references files in FMRoot\Shared\Content using the global image location as set in the
ImageLocation key in the mrIWeb
Web.config file (see
Web service configuration).
<mrSharedRef> tag usage might require additional setup or configuration depending on your cluster.
The shared template location is defined by the TemplateLocation key in the mrIWeb Web.config file. When a relative path such as "Templates" is defined, the template location is prefixed by the ModuleLocation (the directory that mrIWeb.dll is in). For example: **\mrIWeb\Templates\;. When an ImageCacheURL, or an absolute path such as C:\Templates, is defined in the TemplateLocation key, the defined value is used as the template location. The default TemplateLocation value is:
http://localhost/SPSSMR/ImageCache/ImageCache.aspx?File=
<add key="TemplateLocation" value="http://localhost/SPSSMR/ImageCache/ImageCache.aspx?File=">
Configuring interviewer support for <mrSharedRef>
To configure interviewer support for <mrSharedRef>, use one of the following methods. The default installation uses the second method.
▪Copy the shared content to each web tier instance. For example, copy the files that are in FMRoot\Shared\Content\ to wwwroot\mrIWeb**\Images.
▪In Microsoft Internet Information Services Manager, configure the Images virtual directory ([Server Name] > Sites > > mrIWeb > Images) to reference FMRoot\Shared\Content\ (right-click Images and select Properties). In the Images Properties dialog's Virtual Directory tab, select A share located on another computer, and then set Network directory to:
\\<server_name>\SPSSMR_FMRoot\Shared\Content
▪In Microsoft Internet Information Services Manager, configure the Images virtual directory ([Server Name] > [Web Site Name] > mrIWeb > Images) to redirect to the image cache URL. Open the “HTTP Redirect” IIS feature, select Redirect requests to this destination, and then add the external image cache URL:
http://<server_name>/SPSSMR/ImageCache.aspx?File=
where <server_name> is the UNICOM Intelligence Interviewer.
To use this method, you must install the following role (it is not installed by default): Web Server (IIS) > Web Server > Common HTTP Features > HTTP Redirection.
▪Configure the ImageLocation setting in the mrIWeb Web.Config file. When not set, ImageLocation default to the virtual directory mrIWeb\Images. You can redirect to another location by setting ImageLocation as:
<add key="ImageLocation" value=" http://clientsharedcontentserver/resources"/>
This redirect might add an extra server round-trip, resulting in performance implications.
See also