-
Notifications
You must be signed in to change notification settings - Fork 69
Description
I am trying to get the remote authentication working against our ASP.NET MVC 5.2 app. Our app doesn't run in the root of the IIS website - we have to run it as a sub application (i.e. /myapp), and I think this may be causing the problem I am having. Essentially, when the Core app makes the authentication request to the Framework app, it calls "/systemweb-adapters/authenticate" and not "/myapp/systemweb-adapters/authenticate", which then fails with a 404 (I can see this in the IIS logs).
In Program.cs I have the following:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSystemWebAdapters()
.AddRemoteApp(options =>
{
options.RemoteAppUrl = new("http://localhost/MyApp");
options.ApiKey = "MySecretKey";
})
.AddRemoteAppAuthentication(true);
But it seems to ignore the "/MyApp" bit when it makes the request. I have created a dummy solution with a framework app and a core app, and can get the remote authentication working just fine when the framework app is in the root of a website, but as soon as I put it in a sub folder, it fails due to the above path problem.
Is this a bug, or I am approaching this incorrectly?