{"id":21450596,"url":"https://github.com/ogaudefroy/aspnetroutingfeaturetoggle","last_synced_at":"2025-08-09T03:40:59.070Z","repository":{"id":80337785,"uuid":"71390427","full_name":"ogaudefroy/AspNetRoutingFeatureToggle","owner":"ogaudefroy","description":"A feature toggle library with ASP.Net routing ","archived":false,"fork":false,"pushed_at":"2016-12-23T09:14:47.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T07:56:15.430Z","etag":null,"topics":["asp-net","feature-toggle","webforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ogaudefroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-19T19:07:52.000Z","updated_at":"2017-02-27T09:06:13.000Z","dependencies_parsed_at":"2023-06-09T00:45:10.609Z","dependency_job_id":null,"html_url":"https://github.com/ogaudefroy/AspNetRoutingFeatureToggle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ogaudefroy/AspNetRoutingFeatureToggle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FAspNetRoutingFeatureToggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FAspNetRoutingFeatureToggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FAspNetRoutingFeatureToggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FAspNetRoutingFeatureToggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogaudefroy","download_url":"https://codeload.github.com/ogaudefroy/AspNetRoutingFeatureToggle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogaudefroy%2FAspNetRoutingFeatureToggle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269527522,"owners_count":24432437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net","feature-toggle","webforms"],"created_at":"2024-11-23T04:15:54.488Z","updated_at":"2025-08-09T03:40:59.023Z","avatar_url":"https://github.com/ogaudefroy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AspNetRoutingFeatureToggle\r\n[![Build status](https://ci.appveyor.com/api/projects/status/gwb3vj9obv6i2te5/branch/master?svg=true)](https://ci.appveyor.com/project/ogaudefroy/aspnetroutingfeaturetoggle/branch/master)  [![NuGet version](https://badge.fury.io/nu/AspNetRoutingFeatureToggle.svg)](https://badge.fury.io/nu/AspNetRoutingFeatureToggle)  \r\nAspNetRoutingFeatureToggle is a feature toggle library based on ASP.Net routing attempting to solve A/B testing with constant URLs.\r\n\r\n## Use Case\r\nCurrently migrating a legacy ASP.Net application ?  \r\nYou want to implement A/B testing ?  \r\nMaintaining public facing URLs is an explicit requirement ?  \r\nYour URLs are already managed by ASP.Net routing ?\r\n\r\nIf all of the above are true, then you might be interested by this library to succeed your migration path.\r\n\r\nHere is how it works: \r\n\r\n - Feature toggle is based on a predicate with the [RequestContext](https://msdn.microsoft.com/en-us/library/system.web.routing.requestcontext%28v=vs.110%29.aspx) \r\n - If the toggle returns true then ExperimentalRoute is executed\r\n - Otherwise CurrentRoute is executed\r\n    \r\n\r\nCurrent implementation supports WebForms and MVC [IRouteHandler](https://msdn.microsoft.com/fr-fr/library/system.web.routing.iroutehandler(v=vs.110).aspx) implementations ; works with anonymous and named routes.\r\nA fluent builder helps you configure seamlessly your routes.\r\n\r\n## Examples\r\n### WebForms to WebForms\r\n\r\n    var route = FeatureToggleRouteBuilder.WithUrl(\"homepage\")\r\n                .WithFeatureToogle((r) =\u003e r.HttpContext.Request.IsSecureConnection)\r\n                .WithCurrentPageRoute(\"~/WebForm1.aspx\")\r\n                .WithExperimentalPageRoute(\"~/WebForm2.aspx\")\r\n                .Build();\r\n\r\n### WebForms to MVC\r\n\r\n    var route = FeatureToggleRouteBuilder.WithUrl(\"offers/offer-{title}_{id}\")\r\n                .WithFeatureToogle((r) =\u003e r.HttpContext.Request.IsSecureConnection)\r\n                .WithCurrentPageRoute(\"~/Pages/Offers/Details.aspx\", true, \r\n                    defaults: null, \r\n                    constraints: new { id = @\"\\d+\" })\r\n                .WithExperimentalMvcRoute(\r\n                    defaults: new { controller = \"Offers\", action = \"Details\" }, \r\n                    constraints: new { id = @\"\\d+\" })\r\n                .Build();\r\n\r\n### MVC to MVC\r\n\r\n    var route = FeatureToggleRouteBuilder.WithUrl(\"test\")\r\n                .WithFeatureToogle((r) =\u003e r.HttpContext.Request.IsSecureConnection)\r\n                .WithCurrentMvcRoute(new { controller = \"Home\", action = \"Index\" })\r\n                .WithExperimentalMvcRoute(new { controller = \"HomeV2\", action = \"Index\" })\r\n                .Build();\r\n\r\n### MVC to WebForms (sounds weird I know...)\r\n\r\n    var route = FeatureToggleRouteBuilder.WithUrl(\"offers/offer-{title}_{id}\")\r\n                .WithFeatureToogle((r) =\u003e r.HttpContext.Request.IsSecureConnection)\r\n                .WithCurrentMvcRoute(\r\n                    defaults: new { controller = \"Offers\", action = \"Details\" },\r\n                    constraints: new { id = @\"\\d+\" })\r\n                .WithExperimentalPageRoute(\"~/Pages/Offers/Details.aspx\", true,\r\n                    defaults: null,\r\n                    constraints: new { id = @\"\\d+\" })                \r\n                .Build();\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogaudefroy%2Faspnetroutingfeaturetoggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogaudefroy%2Faspnetroutingfeaturetoggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogaudefroy%2Faspnetroutingfeaturetoggle/lists"}