Deleting node in codebehind of a page - The user has no umbraco contextid - try logging in
Hi Guys,
I have moved a scheduled task into a simple aspx page that I'll post to via curl.. so that i could get an http context for deleting nodes as discussed here
Now however I am receiving an error stating: The user has no umbraco contextid - try logging in
So am i correct in assuming I'll need to log an admin user in before running this chunk of code? and if so how would i go about doing that programatically say for example my user in the backend is called "TaskUser" and the password is "password"
Hi Richard.. using reflector it just looks like validateCredentials hits the db to check if the username and password are valid.. good check though.. ill poke around in reflector with the webservices and give it a look:
Deleting node in codebehind of a page - The user has no umbraco contextid - try logging in
Hi Guys,
I have moved a scheduled task into a simple aspx page that I'll post to via curl.. so that i could get an http context for deleting nodes as discussed here
Now however I am receiving an error stating: The user has no umbraco contextid - try logging in
So am i correct in assuming I'll need to log an admin user in before running this chunk of code? and if so how would i go about doing that programatically say for example my user in the backend is called "TaskUser" and the password is "password"
Cheers, Tom
I tried this:
But because the cookie is set in the single response umbraco hasn't picked it up and still thinks there is no auth
Hi,
The Umbraco webservices are using the validateCredentials method on the User object, maybe you can use that?
BusinessLogic.
User.validateCredentials(Login, Password)
Cheers,
Richard
Hi Richard.. using reflector it just looks like validateCredentials hits the db to check if the username and password are valid.. good check though.. ill poke around in reflector with the webservices and give it a look:
is working on a reply...