I have the following code in my startup.cs. Setting up the TokenEndpointPath works perfectly in IIS Express and when the Web API project is deployed to the root of a website in IIS. However, if I host in a nested application (i.e. an application within a website) in IIS calls to the token endpoint result in a 404. Is there a way to base the TokenEndpointPath off of the actual IIS structure instead of the root, as it does here? Right now:
This Works
http://server:80/api/token
This does not
http://server:80/app/api/token
var request = HttpContext.Current.Request;
app.UseOAuthAuthorizationServer(newOAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = newPathString("/api/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(oauthTokenTimeoutInMinutes),
Provider = new Provider.ActiveDirectoryAuthorizationServerProvider()
});