By Ryan Nowak, Steve Smith, and Rick Anderson
-->
Lower Route Api Dotnet Core Problems
For the 1.1 version of this topic, download Routing in ASP.NET Core (version 1.1, PDF).
Routing is responsible for mapping request URIs to endpoint selectors and dispatching incoming requests to endpoints. Routes are defined in the app and configured when the app starts. A route can optionally extract values from the URL contained in the request, and these values can then be used for request processing. Using route information from the app, routing is also able to generate URLs that map to endpoint selectors.
To use the latest routing scenarios in ASP.NET Core 2.2, specify the compatibility version to the MVC services registration in
Startup.ConfigureServices : Subtle expression training tool download.
The EnableEndpointRouting option determines if routing should internally use endpoint-based logic or the IRouter-based logic of ASP.NET Core 2.1 or earlier. When the compatibility version is set to 2.2 or later, the default value is
true . Set the value to false to use the prior routing logic:
For more information on IRouter-based routing, see the ASP.NET Core 2.1 version of this topic.
Routing is responsible for mapping request URIs to route handlers and dispatching an incoming requests. Routes are defined in the app and configured when the app starts. A route can optionally extract values from the URL contained in the request, and these values can then be used for request processing. Using configured routes from the app, routing is able to generate URLs that map to route handlers.
To use the latest routing scenarios in ASP.NET Core 2.1, specify the compatibility version to the MVC services registration in
Startup.ConfigureServices :
Important
This document covers low-level ASP.NET Core routing. For information on ASP.NET Core MVC routing, see Routing to controller actions in ASP.NET Core. For information on routing conventions in Razor Pages, see Razor Pages route and app conventions in ASP.NET Core.
View or download sample code (how to download)
Routing basics
Most apps should choose a basic and descriptive routing scheme so that URLs are readable and meaningful. The default conventional route
{controller=Home}/{action=Index}/{id?} :
Developers commonly add additional terse routes to high-traffic areas of an app in specialized situations (for example, blog and ecommerce endpoints) using attribute routing or dedicated conventional routes.
Web APIs should use attribute routing to model the app's functionality as a set of resources where operations are represented by HTTP verbs. This means that many operations (for example, GET, POST) on the same logical resource will use the same URL. Attribute routing provides a level of control that's needed to carefully design an API's public endpoint layout.
Razor Pages apps use default conventional routing to serve named resources in the Pages folder of an app. Additional conventions are available that allow you to customize Razor Pages routing behavior. For more information, see Introduction to Razor Pages in ASP.NET Core and Razor Pages route and app conventions in ASP.NET Core.
URL generation support allows the app to be developed without hard-coding URLs to link the app together. This support allows for starting with a basic routing configuration and modifying the routes after the app's resource layout is determined.
Routing uses endpoints (
Endpoint ) to represent logical endpoints in an app.
An endpoint defines a delegate to process requests and a collection of arbitrary metadata. The metadata is used implement cross-cutting concerns based on policies and configuration attached to each endpoint.
The routing system has the following characteristics:
Note
Free game alien shooter 3 full version all characters. With the release of endpoint routing in ASP.NET Core 2.2, endpoint linking is limited to MVC/Razor Pages actions and pages. The expansions of endpoint-linking capabilities is planned for future releases.
Routing uses routes (implementations of IRouter) to:
By default, an app has a single collection of routes. When a request arrives, the routes in the collection are processed in the order that they exist in the collection. The framework attempts to match an incoming request URL to a route in the collection by calling the RouteAsync method on each route in the collection. A response can use routing to generate URLs (for example, for redirection or links) based on route information and thus avoid hard-coded URLs, which helps maintainability.
The routing system has the following characteristics:
Routing is connected to the middleware pipeline by the RouterMiddleware class. ASP.NET Core MVC adds routing to the middleware pipeline as part of its configuration and handles routing in MVC and Razor Pages apps. To learn how to use routing as a standalone component, see the Use Routing Middleware section.
URL matching
URL matching is the process by which routing dispatches an incoming request to an endpoint. This process is based on data in the URL path but can be extended to consider any data in the request. The ability to dispatch requests to separate handlers is key to scaling the size and complexity of an app.
When a Routing Middleware executes, it sets an endpoint (
Endpoint ) and route values to a feature on the HttpContext. For the current request:
Middleware running after the Routing Middleware can see the endpoint and take action. For example, an Authorization Middleware can interrogate the endpoint's metadata collection for an authorization policy. After all of the middleware in the request processing pipeline is executed, the selected endpoint's delegate is invoked.
The routing system in endpoint routing is responsible for all dispatching decisions. Since the middleware applies policies based on the selected endpoint, it's important that any decision that can affect dispatching or the application of security policies is made inside the routing system.
When the endpoint delegate is executed, the properties of RouteContext.RouteData are set to appropriate values based on the request processing performed thus far.
URL matching is the process by which routing dispatches an incoming request to a handler. This process is based on data in the URL path but can be extended to consider any data in the request. The ability to dispatch requests to separate handlers is key to scaling the size and complexity of an app.
Incoming requests enter the RouterMiddleware, which calls the RouteAsync method on each route in sequence. The IRouter instance chooses whether to handle the request by setting the RouteContext.Handler to a non-null RequestDelegate. If a route sets a handler for the request, route processing stops, and the handler is invoked to process the request. If no route handler is found to process the request, the middleware hands the request off to the next middleware in the request pipeline.
The primary input to RouteAsync is the RouteContext.HttpContext associated with the current request. The RouteContext.Handler and RouteContext.RouteData are outputs set after a route is matched.
A match that calls RouteAsync also sets the properties of the RouteContext.RouteData to appropriate values based on the request processing performed thus far.
RouteData.Values is a dictionary of route values produced from the route. These values are usually determined by tokenizing the URL and can be used to accept user input or to make further dispatching decisions inside the app.
RouteData.DataTokens is a property bag of additional data related to the matched route. DataTokens are provided to support associating state data with each route so that the app can make decisions based on which route matched. These values are developer-defined and do not affect the behavior of routing in any way. Additionally, values stashed in RouteData.DataTokens can be of any type, in contrast to RouteData.Values, which must be convertible to and from strings.
RouteData.Routers is a list of the routes that took part in successfully matching the request. Routes can be nested inside of one another. The Routers property reflects the path through the logical tree of routes that resulted in a match. Generally, the first item in Routers is the route collection and should be used for URL generation. The last item in Routers is the route handler that matched.
URL generation with LinkGenerator
URL generation is the process by which routing can create a URL path based on a set of route values. This allows for a logical separation between your endpoints and the URLs that access them.
Endpoint routing includes the Link Generator API (LinkGenerator). LinkGenerator is a singleton service that can be retrieved from DI. The API can be used outside of the context of an executing request. MVC's IUrlHelper and scenarios that rely on IUrlHelper, such as Tag Helpers, HTML Helpers, and Action Results, use the link generator to provide link generating capabilities.
The link generator is backed by the concept of an address and address schemes. An address scheme is a way of determining the endpoints that should be considered for link generation. For example, the route name and route values scenarios many users are familiar with from MVC/Razor Pages are implemented as an address scheme.
The link generator can link to MVC/Razor Pages actions and pages via the following extension methods:
An overload of these methods accepts arguments that include the
HttpContext . These methods are functionally equivalent to Url.Action and Url.Page but offer additional flexibility and options.
The
GetPath* methods are most similar to Url.Action and Url.Page in that they generate a URI containing an absolute path. The GetUri* methods always generate an absolute URI containing a scheme and host. The methods that accept an HttpContext generate a URI in the context of the executing request. The ambient route values, URL base path, scheme, and host from the executing request are used unless overridden.
LinkGenerator is called with an address. Generating a URI occurs in two steps:
The methods provided by LinkGenerator support standard link generation capabilities for any type of address. The most convenient way to use the link generator is through extension methods that perform operations for a specific address type.
Warning
Pay attention to the following implications of calling LinkGenerator methods:
Differences from earlier versions of routing
A few differences exist between endpoint routing in ASP.NET Core 2.2 or later and earlier versions of routing in ASP.NET Core:
Middleware example
In the following example, a middleware uses the LinkGenerator API to create link to an action method that lists store products. Using the link generator by injecting it into a class and calling
GenerateLink is available to any class in an app.
URL generation is the process by which routing can create a URL path based on a set of route values. This allows for a logical separation between route handlers and the URLs that access them.
URL generation follows a similar iterative process, but it starts with user or framework code calling into the GetVirtualPath method of the route collection. Each route has its GetVirtualPath method called in sequence until a non-null VirtualPathData is returned.
![]()
The primary inputs to GetVirtualPath are:
Routes primarily use the route values provided by Values and AmbientValues to decide whether it's possible to generate a URL and what values to include. The AmbientValues are the set of route values that were produced from matching the current request. In contrast, Values are the route values that specify how to generate the desired URL for the current operation. The HttpContext is provided in case a route should obtain services or additional data associated with the current context.
Tip
Think of VirtualPathContext.Values as a set of overrides for the VirtualPathContext.AmbientValues. URL generation attempts to reuse route values from the current request to generate URLs for links using the same route or route values.
The output of GetVirtualPath is a VirtualPathData. VirtualPathData is a parallel of RouteData. VirtualPathData contains the VirtualPath for the output URL and some additional properties that should be set by the route.
The VirtualPathData.VirtualPath property contains the virtual path produced by the route. Depending on your needs, you may need to process the path further. If you want to render the generated URL in HTML, prepend the base path of the app.
The VirtualPathData.Router is a reference to the route that successfully generated the URL.
The VirtualPathData.DataTokens properties is a dictionary of additional data related to the route that generated the URL. This is the parallel of RouteData.DataTokens.
Create routes
Routing provides the Route class as the standard implementation of IRouter. Route uses the route template syntax to define patterns to match against the URL path when RouteAsync is called. Route uses the same route template to generate a URL when GetVirtualPath is called.
Most apps create routes by calling MapRoute or one of the similar extension methods defined on IRouteBuilder. Any of the IRouteBuilder extension methods create an instance of Route and add it to the route collection.
MapRoute doesn't accept a route handler parameter. MapRoute only adds routes that are handled by the DefaultHandler. To learn more about routing in MVC, see Routing to controller actions in ASP.NET Core.
MapRoute doesn't accept a route handler parameter. MapRoute only adds routes that are handled by the DefaultHandler. The default handler is an
IRouter , and the handler might not handle the request. For example, ASP.NET Core MVC is typically configured as a default handler that only handles requests that match an available controller and action. To learn more about routing in MVC, see Routing to controller actions in ASP.NET Core.
The following code example is an example of a MapRoute call used by a typical ASP.NET Core MVC route definition:
This template matches a URL path and extracts the route values. For example, the path
/Products/Details/17 generates the following route values: { controller = Products, action = Details, id = 17 } .
Route values are determined by splitting the URL path into segments and matching each segment with the route parameter name in the route template. Route parameters are named. The parameters defined by enclosing the parameter name in braces
{ .. } .
![]()
The preceding template could also match the URL path
/ and produce the values { controller = Home, action = Index } . This occurs because the {controller} and {action} route parameters have default values and the id route parameter is optional. An equals sign (= ) followed by a value after the route parameter name defines a default value for the parameter. A question mark (? ) after the route parameter name defines an optional parameter.
Route parameters with a default value always produce a route value when the route matches. Optional parameters don't produce a route value if there was no corresponding URL path segment. See the Route template reference section for a thorough description of route template scenarios and syntax.
In the following example, the route parameter definition
{id:int} defines a route constraint for the id route parameter:
This template matches a URL path like
/Products/Details/17 but not /Products/Details/Apples . Route constraints implement IRouteConstraint and inspect route values to verify them. In this example, the route value id must be convertible to an integer. See route-constraint-reference for an explanation of route constraints provided by the framework.
Additional overloads of MapRoute accept values for
constraints , dataTokens , and defaults . The typical usage of these parameters is to pass an anonymously typed object, where the property names of the anonymous type match route parameter names.
The following MapRoute examples create equivalent routes:
Tip
The inline syntax for defining constraints and defaults can be convenient for simple routes. However, there are scenarios, such as data tokens, that aren't supported by inline syntax.
The following example demonstrates a few additional scenarios:
The preceding template matches a URL path like
/Blog/All-About-Routing/Introduction and extracts the values { controller = Blog, action = ReadArticle, article = All-About-Routing/Introduction } . The default route values for controller and action are produced by the route even though there are no corresponding route parameters in the template. Default values can be specified in the route template. The article route parameter is defined as a catch-all by the appearance of an double asterisk (** ) before the route parameter name. Catch-all route parameters capture the remainder of the URL path and can also match the empty string.
The preceding template matches a URL path like
/Blog/All-About-Routing/Introduction and extracts the values { controller = Blog, action = ReadArticle, article = All-About-Routing/Introduction } . The default route values for controller and action are produced by the route even though there are no corresponding route parameters in the template. Default values can be specified in the route template. The article route parameter is defined as a catch-all by the appearance of an asterisk (* ) before the route parameter name. Catch-all route parameters capture the remainder of the URL path and can also match the empty string.
The following example adds route constraints and data tokens:
The preceding template matches a URL path like
/en-US/Products/5 and extracts the values { controller = Products, action = Details, id = 5 } and the data tokens { locale = en-US } .
Route class URL generation
The Route class can also perform URL generation by combining a set of route values with its route template. This is logically the reverse process of matching the URL path.
Tip
To better understand URL generation, imagine what URL you want to generate and then think about how a route template would match that URL. What values would be produced? This is the rough equivalent of how URL generation works in the Route class.
The following example uses a general ASP.NET Core MVC default route:
With the route values
{ controller = Products, action = List } , the URL /Products/List is generated. The route values are substituted for the corresponding route parameters to form the URL path. Since id is an optional route parameter, the URL is successfully generated without a value for id .
With the route values
{ controller = Home, action = Index } , the URL / is generated. The provided route values match the default values, and the segments corresponding to the default values are safely omitted.
Both URLs generated round-trip with the following route definition (
/Home/Index and / ) produce the same route values that were used to generate the URL.
Note
An app using ASP.NET Core MVC should use UrlHelper to generate URLs instead of calling into routing directly.
For more information on URL generation, see the Url generation reference section.
Use Routing Middleware
Reference the Microsoft.AspNetCore.App metapackage in the app's project file.
Add routing to the service container in
Startup.ConfigureServices :
Routes must be configured in the
Startup.Configure method. The sample app uses the following APIs:
The following table shows the responses with the given URIs.
If you're configuring a single route, call UseRouter passing in an
IRouter instance. You won't need to use RouteBuilder.
The framework provides a set of extension methods for creating routes (RequestDelegateRouteBuilderExtensions):
Some of listed methods, such as MapGet, require a RequestDelegate. The RequestDelegate is used as the route handler when the route matches. Other methods in this family allow configuring a middleware pipeline for use as the route handler. If the
Map* method doesn't accept a handler, such as MapRoute, it uses the DefaultHandler.
The
Map[Verb] methods use constraints to limit the route to the HTTP Verb in the method name. For example, see MapGet and MapVerb.
Route template reference
Tokens within curly braces (
{ .. } ) define route parameters that are bound if the route is matched. You can define more than one route parameter in a route segment, but they must be separated by a literal value. For example, {controller=Home}{action=Index} isn't a valid route, since there's no literal value between {controller} and {action} . These route parameters must have a name and may have additional attributes specified.
Literal text other than route parameters (for example,
{id} ) and the path separator / must match the text in the URL. Text matching is case-insensitive and based on the decoded representation of the URLs path. To match a literal route parameter delimiter ({ or } ), escape the delimiter by repeating the character ({{ or }} ).
URL patterns that attempt to capture a file name with an optional file extension have additional considerations. For example, consider the template
files/{filename}.{ext?} . When values for both filename and ext exist, both values are populated. If only a value for filename exists in the URL, the route matches because the trailing period (. ) is optional. The following URLs match this route:
You can use an asterisk (
* ) or double asterisk (** ) as a prefix to a route parameter to bind to the rest of the URI. These are called a catch-all parameters. For example, blog/{**slug} matches any URI that starts with /blog and has any value following it, which is assigned to the slug route value. Catch-all parameters can also match the empty string.
The catch-all parameter escapes the appropriate characters when the route is used to generate a URL, including path separator (
/ ) characters. For example, the route foo/{*path} with route values { path = 'my/path' } generates foo/my%2Fpath . Note the escaped forward slash. To round-trip path separator characters, use the ** route parameter prefix. The route foo/{**path} with { path = 'my/path' } generates foo/my/path .
You can use the asterisk (
* ) as a prefix to a route parameter to bind to the rest of the URI. This is called a catch-all parameter. For example, blog/{*slug} matches any URI that starts with /blog and has any value following it, which is assigned to the slug route value. Catch-all parameters can also match the empty string.
The catch-all parameter escapes the appropriate characters when the route is used to generate a URL, including path separator (
/ ) characters. For example, the route foo/{*path} with route values { path = 'my/path' } generates foo/my%2Fpath . Note the escaped forward slash.
Route parameters may have default values designated by specifying the default value after the parameter name separated by an equals sign (
= ). For example, {controller=Home} defines Home as the default value for controller . The default value is used if no value is present in the URL for the parameter. Route parameters are made optional by appending a question mark (? ) to the end of the parameter name, as in id? . The difference between optional values and default route parameters is that a route parameter with a default value always produces a value—an optional parameter has a value only when a value is provided by the request URL.
Route parameters may have constraints that must match the route value bound from the URL. Adding a colon (
: ) and constraint name after the route parameter name specifies an inline constraint on a route parameter. If the constraint requires arguments, they're enclosed in parentheses ((..) ) after the constraint name. Multiple inline constraints can be specified by appending another colon (: ) and constraint name.
The constraint name and arguments are passed to the IInlineConstraintResolver service to create an instance of IRouteConstraint to use in URL processing. For example, the route template
blog/{article:minlength(10)} specifies a minlength constraint with the argument 10 . For more information on route constraints and a list of the constraints provided by the framework, see the Route constraint reference section.
Route parameters may also have parameter transformers, which transform a parameter's value when generating links and matching actions and pages to URLs. Like constraints, parameter transformers can be added inline to a route parameter by adding a colon (
: ) and transformer name after the route parameter name. For example, the route template blog/{article:slugify} specifies a slugify transformer. For more information on parameter transformers, see the Parameter transformer reference section.
The following table demonstrates example route templates and their behavior.
Using a template is generally the simplest approach to routing. Constraints and defaults can also be specified outside the route template.
Tip
Enable Logging to see how the built-in routing implementations, such as Route, match requests.
Reserved routing names
The following keywords are reserved names and can't be used as route names or parameters:
![]() Route constraint reference
Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values. Route constraints generally inspect the route value associated via the route template and make a yes/no decision about whether or not the value is acceptable. Some route constraints use data outside the route value to consider whether the request can be routed. For example, the HttpMethodRouteConstraint can accept or reject a request based on its HTTP verb. Constraints are used in routing requests and link generation.
Warning
Don't use constraints for input validation. If constraints are used for input validation, invalid input results in a 404 - Not Found response instead of a 400 - Bad Request with an appropriate error message. Route constraints are used to disambiguate similar routes, not to validate the inputs for a particular route.
The following table demonstrates example route constraints and their expected behavior.
Multiple, colon-delimited constraints can be applied to a single parameter. For example, the following constraint restricts a parameter to an integer value of 1 or greater:
Warning
Route constraints that verify the URL and are converted to a CLR type (such as
int or DateTime ) always use the invariant culture. These constraints assume that the URL is non-localizable. The framework-provided route constraints don't modify the values stored in route values. All route values parsed from the URL are stored as strings. For example, the float constraint attempts to convert the route value to a float, but the converted value is used only to verify it can be converted to a float.
Regular expressions
The ASP.NET Core framework adds
RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.CultureInvariant to the regular expression constructor. See RegexOptions for a description of these members.
Regular expressions use delimiters and tokens similar to those used by Routing and the C# language. Regular expression tokens must be escaped. To use the regular expression
^d{3}-d{2}-d{4}$ in routing, the expression must have the (single backslash) characters provided in the string as (double backslash) characters in the C# source file in order to escape the string escape character (unless using verbatim string literals). To escape routing parameter delimiter characters ({ , } , [ , ] ), double the characters in the expression ({{ , } , [[ , ]] ). The following table shows a regular expression and the escaped version.
Regular expressions used in routing often start with the caret (
^ ) character and match starting position of the string. The expressions often end with the dollar sign ($ ) character and match end of the string. The ^ and $ characters ensure that the regular expression match the entire route parameter value. Without the ^ and $ characters, the regular expression match any substring within the string, which is often undesirable. The following table provides examples and explains why they match or fail to match.
For more information on regular expression syntax, see .NET Framework Regular Expressions.
To constrain a parameter to a known set of possible values, use a regular expression. For example,
{action:regex(^(list|get|create)$)} only matches the action route value to list , get , or create . If passed into the constraints dictionary, the string ^(list|get|create)$ is equivalent. Constraints that are passed in the constraints dictionary (not inline within a template) that don't match one of the known constraints are also treated as regular expressions.
Custom Route Constraints
In addition to the built-in route constraints, custom route constraints can be created by implementing the IRouteConstraint interface. The IRouteConstraint interface contains a single method,
Match , which returns true if the constraint is satisfied and false otherwise.
To use a custom IRouteConstraint, the route constraint type must be registered with the app's ConstraintMap in the app's service container. A ConstraintMap is a dictionary that maps route constraint keys to IRouteConstraint implementations that validate those constraints. An app's ConstraintMap can be updated in
Startup.ConfigureServices either as part of a services.AddRouting call or by configuring RouteOptions directly with services.Configure<RouteOptions> . For example:
The constraint can then be applied to routes in the usual manner, using the name specified when registering the constraint type. For example:
Parameter transformer reference
Parameter transformers:
For example, a custom
slugify parameter transformer in route pattern blog{article:slugify} with Url.Action(new { article = 'MyTestArticle' }) generates blogmy-test-article .
To use a parameter transformer in a route pattern, configure it first using ConstraintMap in
Startup.ConfigureServices :
Parameter transformers are used by the framework to transform the URI where an endpoint resolves. For example, ASP.NET Core MVC uses parameter transformers to transform the route value used to match an
area , controller , action , and page .
With the preceding route, the action
SubscriptionManagementController.GetAll() is matched with the URI /subscription-management/get-all . A parameter transformer doesn't change the route values used to generate a link. For example, Url.Action('GetAll', 'SubscriptionManagement') outputs /subscription-management/get-all .
ASP.NET Core provides API conventions for using a parameter transformers with generated routes:
URL generation reference
The following example shows how to generate a link to a route given a dictionary of route values and a RouteCollection.
The VirtualPath generated at the end of the preceding sample is
/package/create/123 . The dictionary supplies the operation and id route values of the 'Track Package Route' template, package/{operation}/{id} . For details, see the sample code in the Use Routing Middleware section or the sample app.
The second parameter to the VirtualPathContext constructor is a collection of ambient values. Ambient values are convenient to use because they limit the number of values a developer must specify within a request context. The current route values of the current request are considered ambient values for link generation. In an ASP.NET Core MVC app's
About action of the HomeController , you don't need to specify the controller route value to link to the Index action—the ambient value of Home is used.
Ambient values that don't match a parameter are ignored. Ambient values are also ignored when an explicitly provided value overrides the ambient value. Matching occurs from left to right in the URL.
Values explicitly provided but that don't match a segment of the route are added to the query string. The following table shows the result when using the route template
{controller}/{action}/{id?} .
If a route has a default value that doesn't correspond to a parameter and that value is explicitly provided, it must match the default value:
Link generation only generates a link for this route when the matching values for
controller and action are provided.
Complex segments
Complex segments (for example
[Route('/x{token}y')] ) are processed by matching up literals from right to left in a non-greedy way. See this code for a detailed explanation of how complex segments are matched. The code sample is not used by ASP.NET Core, but it provides a good explanation of complex segments.
I've just swapped our project from ASP .Net Core 1.0.0-rc2-final to 1.0.0. Our website and client have stopped working because of the capitalization of JSON properties. For example, this line of JavaScript now fails
because the controller now calls the array 'items' instead of 'Items'. I have made no changes beyond installing the updated packages and editing the project.json file. I have not changed the C# model files which still capitalize their properties.
Why have the ASP.Net Core controllers started returning JSON with lower-cased properties? How do I go back to them honoring the case of the property names from the model?
dumbledaddumbledad
6,0781414 gold badges6666 silver badges182182 bronze badges
3 Answers
MVC now serializes JSON with camel case names by default
Use this code to avoid camel case names by default
Source:https://github.com/aspnet/Announcements/issues/194
Sasha FentsykSasha Fentsyk
3,09044 gold badges2828 silver badges3737 bronze badges
You can change the behavior like this:
See the announcement here: https://github.com/aspnet/Announcements/issues/194
Stephen Kennedy
8,2231313 gold badges5555 silver badges7373 bronze badges
Joe AudetteJoe Audette
19.3k55 gold badges6969 silver badges8080 bronze badges
For some one who is using ASP.net WEB API ( rather than ASP.NET Core).
Add this line in your WebApiConfig.
Another simpler way would be to add them all manually. Starcraft melee vs free for all. If you have computer players in your game, you'll have to remove them manually or do it another way.
Adding this as an answer here because this comes up first in google search for web api as well.
Abdul Rehman SayedAbdul Rehman Sayed
4,49044 gold badges2727 silver badges5353 bronze badges
Not the answer you're looking for? Browse other questions tagged asp.net-coreasp.net-core-1.0 or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |