It works with Web API :)
Here is my simple test:
public class jbController : ApiController
{
// GET api/<controller>
public HttpResponseMessage Get()
{
String s = "";
s += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
s += "<juiceboxgallery>";
s += "<image imageURL=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\"";
s += " thumbURL=\"\"";
s += " linkURL=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\"";
s += " linkTarget=\"_blank\"";
s += " sourcePath=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\">";
s += "<title></title>";
s += "<caption></caption>";
s += "</image>";
s += "<image imageURL=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\"";
s += " thumbURL=\"\"";
s += " linkURL=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\"";
s += " linkTarget=\"_blank\"";
s += " sourcePath=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\">";
s += "<title></title>";
s += "<caption></caption>";
s += "</image>";
s += "</juiceboxgallery>";
return new HttpResponseMessage() { Content = new StringContent(s, Encoding.UTF8, "application/xml") };
}
}
And here is the configuration:
<!--START JUICEBOX EMBED-->
<script src="../LIB/jbcore/juicebox.js"></script>
<script>
new juicebox({
configUrl: '/api/jb',
containerId: "juicebox-container",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "#222222"
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
Thanks for all the help!