Created
September 1, 2016 09:19
-
-
Save demius/7f926f2d05c32edd3a3ba832852752e0 to your computer and use it in GitHub Desktop.
Extensionless WCF service hosting using ASP.NET Routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ServiceModel.Activation; | |
using System.Web.Routing; | |
namespace ACME.Services | |
{ | |
public class Global : System.Web.HttpApplication | |
{ | |
protected void Application_Start(object sender, EventArgs e) | |
{ | |
RegisterRoutes(RouteTable.Routes); | |
} | |
private void RegisterRoutes(RouteCollection routes) | |
{ | |
routes.Add(new ServiceRoute("SampleWcfService", new ServiceHostFactory(), typeof(ACME.Services.SampleWcfService))); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment