Questions tagged [context-user]
Questions about Sitecore context user whether it is an anonymous and authenticated user, should use this tag
6
questions
1
vote
2
answers
138
views
how can I run code on Sitecore on an event under a specific security account?
The events handlers in Sitecore run under default\anonymous (i.e. onpublish:end:remote). Can I run the code under Extranet\anonymous account?
0
votes
1
answer
86
views
Sitecore.Context.IsLoggedIn always returns false with Areas
I have created an MVC area in the solution:
Areas
|_ CAG
|_ Controllers
|_ Models
|_ Views
When published, the Areas folder goes into the root of the instance's webroot.
Here is the ...
0
votes
1
answer
84
views
Code on German server parsing data correctly when run from admin page, but incorrectly when run as scheduled task
I posted this on https://stackoverflow.com/questions/70023408/aspose-worksheet-not-parsing-decimal-numbers-correctly-on-german-server-ignorin as well but figured I would frame it as a Sitecore ...
2
votes
1
answer
604
views
Virtual User causing error with AntiForgeryToken, The provided anti-forgery token was meant for user "extranet\user", but the current user is ""
My site uses SSO for login so most site users do not have Sitecore accounts, as such when a user logs in a virtual user is created:
protected void CreateVirtualUser(SSOCentralUser user)
{
...
5
votes
2
answers
737
views
Virtual user persisting Roles after logout
I am trying to login a virtual user for my application and have assigned roles to this virtual user.
var virtualUser = Sitecore.Security.Authentication.AuthenticationManager.BuildVirtualUser(userName, ...
1
vote
1
answer
510
views
MVC custom controller Context.User is anonymous when authenticated
Any idea why Sitecore 9.3 would not pick up authenticated information of the user on a simple custom MVC controller method? I am trying to get the currently logged-in user, but it is showing Sitecore....