oauth not found on Umbraco.Web.Editors.BackOfficeController with v7.4.1
Howdy folks. I use VisualStudio v14, recently upgraded to 7.4.1 via the NuGet package manager and Umbraco is now returning a server error page "Server Error in '/' Application" - replying with a 404 for "/umbraco/oauth/token" when I make token requests. The error also states, A public action method 'oauth' was not found on controller 'Umbraco.Web.Editors.BackOfficeController'.
I had the base Umbraco RestApi configuration working just fine in my previous installation of 7.3.8.
I have uninstalled and reinstalled the Umbraco RestApi and IdentityExtensions, validated my configurations in both Web.config and UmbracoStandardOwinStartup.cs, rebuilt my site and still getting a 404 server error. I have also validated that my UrlRewriting.config is not interfering with the request
Hi Simon, thanks for possible validation that this might be an issue with v7.4.1. I haven't been able to resolve it yet, but If time allows, I intend to investigate further by setting up a clean v7.4.1 and test if the issue occurs.
Hi Simon and to anyone else with this issue. I believe I have a resolution.
Token authorization using the /umbraco/oauth/token service path requires a HTTPS protocol. Even though Production and/or enterprise managed servers have SSL properly configured, our PDEs seldom are.
Here's what I did to enable SSL in my Visual Studio 2015 .net 4.5.2 web site project for my Umbraco instance.
In the *.csproj file find the node: <IISExpressSSLPort /> and change it to: <IISExpressSSLPort>44300</IISExpressSSLPort> FYI - the port number must be between 44300 and 44399 and make sure these ports are open on your PDE. Visual Studio will prompt you to make some determinations about its behavior towards SSL configuration and future SSL configurations, so those determinations are up to you.
So here's a working request for a token from the localhost:
Because I opted to install a local SSL generated by VS, the verification by curl fails, so the -k flag is used to disable the verification for the current request.
oauth not found on Umbraco.Web.Editors.BackOfficeController with v7.4.1
Howdy folks. I use VisualStudio v14, recently upgraded to 7.4.1 via the NuGet package manager and Umbraco is now returning a server error page "Server Error in '/' Application" - replying with a 404 for "/umbraco/oauth/token" when I make token requests. The error also states, A public action method 'oauth' was not found on controller 'Umbraco.Web.Editors.BackOfficeController'.
I had the base Umbraco RestApi configuration working just fine in my previous installation of 7.3.8.
I have uninstalled and reinstalled the Umbraco RestApi and IdentityExtensions, validated my configurations in both Web.config and UmbracoStandardOwinStartup.cs, rebuilt my site and still getting a 404 server error. I have also validated that my UrlRewriting.config is not interfering with the request
Here is the token request I use:
curl -X POST -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'grant_type=password&username=admin&password=pwd' http://localhost:12345/umbraco/oauth/token
Does anyone have any suggestions how I can debug, or better yet a solution for me?
Hi Joshua,
I'm getting the same issue with that version of Umbraco; have you managed to resolve this yet?
Hi Simon, thanks for possible validation that this might be an issue with v7.4.1. I haven't been able to resolve it yet, but If time allows, I intend to investigate further by setting up a clean v7.4.1 and test if the issue occurs.
Hi Simon and to anyone else with this issue. I believe I have a resolution.
Token authorization using the
/umbraco/oauth/token
service path requires a HTTPS protocol. Even though Production and/or enterprise managed servers have SSL properly configured, our PDEs seldom are.Here's what I did to enable SSL in my Visual Studio 2015 .net 4.5.2 web site project for my Umbraco instance.
In the *.csproj file find the node:
<IISExpressSSLPort />
and change it to:<IISExpressSSLPort>44300</IISExpressSSLPort>
FYI - the port number must be between 44300 and 44399 and make sure these ports are open on your PDE. Visual Studio will prompt you to make some determinations about its behavior towards SSL configuration and future SSL configurations, so those determinations are up to you.So here's a working request for a token from the localhost:
curl -X POST -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'grant_type=password&username=######&password=******' -k https://localhost:44300/umbraco/oauth/token
Notice the
-k
flag.Because I opted to install a local SSL generated by VS, the verification by
curl
fails, so the-k
flag is used to disable the verification for the current request.I hope this helps! Good luck!
is working on a reply...