Project DescriptionWeb service that provides data for Slide.Show from a given directory. It takes album names from nested directories. That way data is extracted from file system containing pictures (slides) in folders.
Actually this is a custom implementation of IXmlSerializable interface, that provides custom formated web service output. That way we get the appropriate XML for Slide.Show application. Solution consist of two parts:
- Custom serializator that takes data tables containing albums and slides
- Interface that creates data tables from given folder containing slides (pictures). The album names are extracted from the name of the directory.
Web service also includes caching, and multi threading for better performance.
More information can be found at
http://www.terpinc.com/default.aspx?id=24 Quick instalaton guide Copy the bin directory, web.config and CustomSerializator.asmx to the directory containing your pictures, then provide Slide.Show with the data source from the URL of the web service.
After copying the files (be sure that folder is set as an application in IIS service configuration) you need to provide Slide.Show’s configuration.xml with following data provider: http://yourCustomUrl/customSerializator.asmx/GetAlbumsPictures
<dataProvider type="XmlDataProvider" >
<option name="url" value="http://yourCustomUrl/customSerializator.asmx/GetAlbumsPictures"> </option>
</dataProvider>
Additional attributes to the data tag can be added in web.config. Use SSWS_ + data tag attribute name in web.config
That’s it. It should work as planned.
There are two web methods implemented at the time:
- GetAlbumsPictures – it loops through first level of folders, and gets the containing pictures. Album names are set from the names of the directories.
- GetRandomPictures - gets the pictures from the root folder, but skips the pictures from the folders. It return’s pictures in random order.
Backlink:
Additional information on starting a new project is available here:
Project Startup Guide.