I have finally managed to solve the issue.
It looks like I did not upgrade the WebAPI project correctly.
The line below was missing from my WebApi Module's Initialize() method:
Configuration.Modules.AbpWebApi().HttpConfiguration.Filters.Add(new HostAuthenticationFilter("Bearer"));
Once added, the 401 response code is returned.
ABP version is 1.2.2.0
I've made the request, bit it returns with a 200 OK code and the body of the response is the login page HTML.
It must be noted that this is not an ABP Core project and that it was upgraded from ABP 0.8 to 0.11 previously and then upgraded to 1.2.2 yesterday.
Hi.
I'm trying to expose an application service method to a 3rd party that determines whether the user should be authorised to access the method inside of the method. If authorisation is required, I want to return a 401 HTTP code.
What I've done is to throw a AbpAuthorizationException when authorisation is required, but this redirects the request to the application login page with a 302 response code. I want to return a 401 response to allow the 3rd party to authenticate the user.
How can I accomplish this?
It would seem that the framework is opening the assemblies in the specified plugin folder exclusively and not allowing these files to be changed.
My Application_Start code is as follows:
...
var pluginsPath = Server.MapPath(@"~/PlugIns/");
if (Directory.Exists(pluginsPath))
AbpBootstrapper.PlugInSources.AddFolder(pluginsPath);
...
When I try to replace an assembly in the Plugins folder, I get "The action can't be completed because the folder or a file in it is open in another program". I then have to stop the IIS process, replace the file and start the IIS process again. Am I missing something here?