%@ WebHandler Language="C#" Class="Config" %>
using System;
using System.Web;
using System.IO;
using System.Net;
using System.Text;
///
/// Allows to provide a client with a backend specific configuration. See
/// javascript/examples/editors/config/diagrameditor.xml for more details.
///
public class Config : IHttpHandler
{
///
/// Loads the config via HTTP so we can use the virtual dir as path
///
public void ProcessRequest (HttpContext context)
{
WebRequest wr = WebRequest.Create("http://localhost/mxgraph/dotnet/diagrameditor-backend.xml");
context.Response.Write(new StreamReader(wr.GetResponse().GetResponseStream()).ReadToEnd());
}
///
/// Return false in case your Managed Handler cannot be reused for another request.
/// This would be false in case you have some state information preserved per request.
///
public bool IsReusable
{
get { return true; }
}
}