How To Setup The ArcGIS Viewer For Silverlight Inside A Virtual Directory
With the ArcGIS Viewer for Silverlight now released (http://geo.geek.nz/) I guess I can talk about some of the in’s and out’s. I ran into an issue today when trying to install the viewer. I keep my IIS root reasonably clean and wanted to install the viewer and builder into a virtual directory rather than the root of IIS.
The problem you have is that you cannot specify a virtual directory during the installation. The default options are to install the viewer and the builder into virtual directories which are automatically created on the root of IIS.
Well it’s reasonably straightforward to remap the virtual directories once the installation has finished. Install the ArcGIS Viewer for Silverlight as normal. After the installation has completed, move the Builder and Applications folders into a virtual directory or a sub folder using Windows Explorer. Head into IIS Manager and remove the existing Builder site as an application.
Then convert the moved Builder folder into an application using the SilverlightViewerAppPool. This should be everything you need to do in IIS to have things remapped and setup.
The last step is to tell the Builder where the new locations for applications has moved to. This can be done by modifying the web.config file found in the Builder directory. Under appSettings there are two keys that need modifying.
<appSettings>
<add key=”AppsBaseUrl” value=http://DAVIS:80/Silverlight/Applications/ />
<add key=”AppsPhysicalDir” value=”C:\Inetpub\Wwwroot\Silverlight\Applications” />
</appSettings>
Save this web.config file and you are all done. The Builder should now work against your new URL. In my case this is Silverlight\Builder.
So my IIS setup now looks like cleaner with the ArcGIS Viewer for Silverlight installed and run under a Silverlight folder as opposed to the root.
You are probably wondering why I wanted to do this? Well the simple answer is that I wanted to share this server with not only the ArcGIS Viewer for Silverlight but also the ArcGIS Viewer for Flex. So I have ended up with the following on this server:
- /Silverlight/Builder
- /Silverlight/Applications
- /Flex/Applications
This now makes it easy and simple for those using the server to create applications in the flavour they would like.
- arcgis-server | arcgis-server-10 | configuration | iis | setup | silverlight | viewer

