Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (25 sloc) 713 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ServiceModel;
using AzureTunnel;
namespace AzureTunnel.Client.Web.Controllers
{
public class RelayController : Controller
{
//
// GET: /Relay/
public ActionResult Index(TwilioRequestViewModel vm)
{
var cf = new ChannelFactory<IAzureTunnelServiceChannel>("relay");
using (var ch = cf.CreateChannel())
{
vm.Method = Request.HttpMethod;
string result = ch.Relay(vm);
return Content(result, "application/xml");
}
}
}
}