/WCFWebApi/samples/scenario/ContactManager_Simple/Global.asax.cs

# · C# · 21 lines · 15 code · 3 blank · 3 comment · 0 complexity · 442f9933f8fdef190bcaae05d176f38d MD5 · raw file

  1. // <copyright>
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // </copyright>
  4. namespace ContactManager_Simple
  5. {
  6. using System;
  7. using System.Web.Routing;
  8. using Microsoft.ApplicationServer.Http;
  9. public class Global : System.Web.HttpApplication
  10. {
  11. protected void Application_Start(object sender, EventArgs e)
  12. {
  13. RouteTable.Routes.SetDefaultHttpConfiguration(new WebApiConfiguration() { EnableTestClient = true });
  14. RouteTable.Routes.MapServiceRoute<ContactApi>("Contact");
  15. RouteTable.Routes.MapServiceRoute<ContactsApi>("Contacts");
  16. }
  17. }
  18. }