I am having some troubles trying to figure out the right settings for the courier.config with regards to users, if anyone can shed some light on this, it would be greatly appreciated.
I have Server A (staging) and Server B (production). Content from Server A gets transfered to Server B
I have a user on Server A that has a userId of 4.
I added <user>4</user> to the <allowedUsers> to the courier.config on Server A.
I log into umbraco on Server A, and transfer content from context menu, and click the "transfer" button on the dialog window and get the following application error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.BusinessLogic.Exceptions.UnauthorizedClientException: User with id '-1' is not allowed to use Courier. To authorize this user for Courier, add it to the list of authorized users in the courier.config file at Umbraco.Courier.Webservices.Helper.AuthorizeClient(String login, String password) at Umbraco.Courier.Webservices.Messenger.ValidateDependency(String dependencyKey, Object validationObject, String login, String password) --- End of inner exception stack trace ---
I then added <user>4</user> to the <allowedUsers> to the
courier.config on Server B.
I have also double checked that user's and the user type's permissions, and those are checked to Transfer.
Still getting the same error.
My questions are:
1.) Does anyone one know why I would be getting this error, or what I can check and the error is stating "User is id '-1'", which is not the userId I am logged in as?
2.) Which courier.config should i be configuring, Server A or Server B or both?
3.) There are 3 points of permissions for Courier: <allowedUsers><user></user></allowedUsers>; <contextMenu><userType></userType></contextMenu>; and the Default Permissions on the User Type. Which one is looked at first for adding the context menu item? and which one overrides which?
Does the user exists in both environments? And does it have the same combination of user/pw?
If not then this is the error message you'll get. The reason that it is a bit misguiding is that the newer versions of Umbraco returns "-1" as the user id instead of null if the user isn't authenticated. This causes the internal error handling in Courier to get a bit confused as it expects "null" when credentials are wrong. I've logged this as a bug and it'll be fixed for Courier 1.2.
The user does not exist in both environments, I was not aware that the user had to be in both enviroments. Thanks for helping me with that.
I would assume all the user permissions on the production side are being validated when transferring? Why I am asking that is, there are several layers of content owners/users in the staging environment, but very limited in the production environment. Is it possible to have the user in staging, transfer the content successfully through courier, but that user account on the production side is restricted login access?
Courier Allowed Users
I am having some troubles trying to figure out the right settings for the courier.config with regards to users, if anyone can shed some light on this, it would be greatly appreciated.
I have Server A (staging) and Server B (production). Content from Server A gets transfered to Server B
I have a user on Server A that has a userId of 4.
I added <user>4</user> to the <allowedUsers> to the courier.config on Server A.
I log into umbraco on Server A, and transfer content from context menu, and click the "transfer" button on the dialog window and get the following application error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.BusinessLogic.Exceptions.UnauthorizedClientException: User with id '-1' is not allowed to use Courier. To authorize this user for Courier, add it to the list of authorized users in the courier.config file
at Umbraco.Courier.Webservices.Helper.AuthorizeClient(String login, String password)
at Umbraco.Courier.Webservices.Messenger.ValidateDependency(String dependencyKey, Object validationObject, String login, String password)
--- End of inner exception stack trace ---
I then added <user>4</user> to the <allowedUsers> to the courier.config on Server B.
I have also double checked that user's and the user type's permissions, and those are checked to Transfer.
Still getting the same error.
My questions are:
1.) Does anyone one know why I would be getting this error, or what I can check and the error is stating "User is id '-1'", which is not the userId I am logged in as?
2.) Which courier.config should i be configuring, Server A or Server B or both?
3.) There are 3 points of permissions for Courier: <allowedUsers><user></user></allowedUsers>; <contextMenu><userType></userType></contextMenu>; and the Default Permissions on the User Type. Which one is looked at first for adding the context menu item? and which one overrides which?
We are using Umbraco 4.0.3 with Courier 1.1.1.
Thanks in advance!
I'll take a look tomorrow morning when I get into the office!
Does the user exists in both environments? And does it have the same combination of user/pw?
If not then this is the error message you'll get. The reason that it is a bit misguiding is that the newer versions of Umbraco returns "-1" as the user id instead of null if the user isn't authenticated. This causes the internal error handling in Courier to get a bit confused as it expects "null" when credentials are wrong. I've logged this as a bug and it'll be fixed for Courier 1.2.
The user does not exist in both environments, I was not aware that the user had to be in both enviroments. Thanks for helping me with that.
I would assume all the user permissions on the production side are being validated when transferring? Why I am asking that is, there are several layers of content owners/users in the staging environment, but very limited in the production environment. Is it possible to have the user in staging, transfer the content successfully through courier, but that user account on the production side is restricted login access?
Thanks again Niels!
User permissions aren't validated, which in your case is a good thing then ;-)
Thanks for the help!
is working on a reply...