Missing curent principal.

Posted by Community Admin on 04-Aug-2018 20:34

Missing curent principal.

All Replies

Posted by Community Admin on 07-Jun-2011 00:00

screenshot

Just created a new project and set it up... Receiving Missing current principal when I try to publish a page or a content type like an event.. not sure what's up, can't seem to find anything in the documentation or by searching the forums.  Running 4.1 1395 now but was receiving it with 4.1 1339 earlier.

Posted by Community Admin on 08-Jun-2011 00:00

Hi Tony,

Thank you for contacting us.

Can you provide the stack trace of the error? Also can you give me more information about the actions which led to this error? Did you try to delete a page, or modify a setting in your website?

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 08-Jun-2011 00:00

The first thing I did when I installed it was to create a new page with the Events module in one of the content areas and attempt to publish it.  That's when I received the error.. I then tried to publish an Event and received the same error.  Then I tried to create a new page with nothing on it and publish it and received the error.

I'm not really sure how to get the stack trace... the call stack stays empty when I received that error while debugging in VS2010. 

Posted by Community Admin on 09-Jun-2011 00:00

Hello Tony,

We thrown this error only when the current user is null.

var user = SecurityManager.GetCurrentUser(); and the current principal is null. . This means that a user which is responsible for some content on your site is not present in the database. Have you tried to create some content with a specific user then you have removed the user ? Can you try to run the project through our ProjectManager, create an administrator and access the backend. Then try to create a page ( event ).

Best wishes,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Jun-2011 00:00

Hi Victor,

I'm using multi threading. I'm trying to use a manager to retrive content on a different thread. I'm getting "Missing current principal" error. How should I execute the manager with a specified user account?

Thanks,
Duneel

Posted by Community Admin on 23-Jun-2011 00:00

Hello Duneel,

I have answered you in the support ticket you have opened. I hope you don't mind to continue our communication there.

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 25-Jul-2011 00:00

Alright sorry I haven't gotten back to this yet.. We're just about to fire up our project so I need to give it another try.  I installed a new version of Sitefinity 4.1.1574.  I created a new filesystem project, launched it with ProjectManager and used SqlExpress and various other defaults.  Install worked fine I logged in and immeditely created a new page, added a content block, and hit publish.  I received the same Missing current principal error.  I then went and created another administrator account from the user management area and logged into it and tried to publish the page with a new content block (because I couldn't save the last one) and received the same error.  I then tried to create an event and received the same error.  No users have been deleted I just used the first admin user set up with the project and a second admin user.

Posted by Community Admin on 27-Jul-2011 00:00

Hello Tony,

Can you open a support ticket, so I can send you a sample project for testing.

Best wishes,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 12-Jan-2012 00:00

We're seeing this error after attempting to upgrade from 4.0 to 4.4. Was there ever any resolution to this?

Posted by Community Admin on 12-Jan-2012 00:00

Actually it was only happening when I installed the Project Manager and created the project on my workstation running Windows 7 (don't think it was OS specific though).  I've had to install/upgrade it on my virtual machine or our staging server except since 4.4 I was able to install 4.4 and upgrade my project with no issues.

Posted by Community Admin on 12-Jan-2012 00:00

Thanks Tony - that gives me a little more to go on. We are doing exactly what you mentioned: upgrading the sitefinity project on our local machine then deploying it to our dev server. Works fine locally but not on the dev server. Both dev and my localhost are pointing to the same dev database, so the database part should be already upgraded. 

Since your last note I installed sitefinity 4.4 on our dev server but I haven't reverted the codebase back to 4.0 to do a re-conversion to 4.4 again on the dev server. I'm really hoping I don't have to do that since I've made so many code changes locally just to get 4.4 working for us. 

Any other thoughts?

Posted by Community Admin on 12-Jan-2012 00:00

More info:

Creating a new admin user to publish content doesn't help. Receiving "missing principal" error when saving/publishing news items. Receiving "object reference not set to an object" when saving/publishing pages. 

Stack trace from the object reference not set to an object error: 
System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
Telerik.Sitefinity.ContentWorkflows.IService.SendMessage(String operationName, Boolean isCheckedOut, Guid workflowDefinitionId, Guid contentId, String providerName, Dictionary`2 contextBag)
Telerik.Sitefinity.Workflow.WorkflowManager.MessageWorkflow(String wokflowUrl, String operationName, WorkflowDefinition workflowDefinition, Guid contentId, String providerName, Boolean isCheckedOut, Dictionary`2 contextBag)
Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.CallWorkflowBatch(String[] pageIDs, String operationName, String providerName, String deletedLanguage)
Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.BatchPublishDraft(String[] pageIDs)
SyncInvokeBatchPublishDraft(Object , Object[] , Object[] )
System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
Telerik.Sitefinity.Utilities.MS.ServiceModel.Web.AsyncResult.Complete(Boolean completedSynchronously)
Telerik.Sitefinity.Utilities.MS.ServiceModel.Web.RequestInterceptorReplyChannelBase`1.TryReceiveRequestAsyncResult.InnerTryReceiveCallback(IAsyncResult result)
System.ServiceModel.Diagnostics.TraceUtility.<>c__DisplayClass4.<CallbackGenerator>b__2(AsyncCallback callback, IAsyncResult result)
System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
System.Runtime.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
System.Runtime.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, Action callback)
System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)


Also, when starting up the sitefinity instance on our dev server using the project manager, the error slightly changes: 
Error when publishing pages: 
"The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error." 

Same error when publishing news items. This might be a red herring though since as I mentioned before, we upgraded the sitefinity instance locally then deployed to this dev server. We've never really used project manager to launch sitefinity, always through visual studio instead. 

Posted by Community Admin on 17-Jan-2012 00:00

Hello Ben,

Could you share more information about your dev machine setup, where publishing is throwing errors? Are you using a proxy or some other internal redirection setting ( or a firewall ) which might be affecting the default behaviour of Sitefinity?

Also when upgrading Sitefinity I would like to suggest to perform the upgrade on a local copy of the project ( the files and the database working together on a local machine ) to ensure that the system has all proper permissions over required resources.

Regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Jan-2012 00:00

Hi Victor. Thanks for your response. 

We do have a Microsoft ISA proxy server operating on our network. I'm not sure what filtering it does on our internal network (which is where the dev server resides) but it certainly filters all outgoing traffic through our company firewall onto the internet. We also have a Microsoft forefront client installed on all machines (including our dev server) and we've also recently setup MS Appfabric on the server too.

Prior to this upgrade, we had two sitefinity 4.0 sites running flawlessly with this setup. To upgrade I did do the steps you mentioned - upgrading my local copy of the project code base, then copied it exactly to our dev server. We use the same dev database server for sites on our local machines and sites on the dev server, so the sitefinity database was effectively upgraded when I upgraded the codebase on my local machine. (So I only copied the codebase to the dev server, I left the database on the db server alone since it was already upgraded by that point).  We using MS SQLExpress for the sitefinity database. 

As far as permissions go, I've granted full control permission to the Network Service, IUSR and IIS_IUSRS roles on the entire root website folder on the dev server. As far as DB permissions go, I've made all the users in the users list of the database have db_owner permissions. 

Posted by Community Admin on 17-Jan-2012 00:00

I was inspired by your question on the proxy server so I remoted into our dev server and opened up the sitefinity admin from a browser there and still received the same errors. We have an entry in the hosts file on the dev server that maps the dev website to 127.0.0.1, so I *think* this test completely bypasses our proxy server and still shows the errors. I'm going to open fiddler2 and see if I can find anything further. 

Posted by Community Admin on 17-Jan-2012 00:00

I have no idea if this helps or not but using Fiddler2 I'm seeing the following: 

When publishing pages: 
500 error hitting the URL: /Sitefinity/Services/Pages/PagesService.svc/batchPublishDraft/
Error Message: HTTP/1.1 500 0 item(s) are successfully published. 1 item(s) cannot be published (see below).  Page Services and Solutions: Object reference not set to an instance of an object.

When publishing documents/files:
500 error hitting the URL: ndbhdev/.../
HTTP/1.1 500 0 item(s) are successfully published. 1 item(s) cannot be published (see below).  Content Item test: Missing current principal.


Posted by Community Admin on 18-Jan-2012 00:00

Hello Ben,

Thank you for providing the detailed description of your infrastructure as well as of the issue. However I am pretty sure that the problem is somewhere along the track, as the issue is reproducible only when Sitefinity runs under AppFabric. Unfortunately Sitefinity does not support AppFabric at the moment.

Please consider checking the following thread where a similar issue is discussed:

www.sitefinity.com/.../unable-to-save-or-publish-pages-4-2-1650.aspx

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 18-Jan-2012 00:00

Thanks for the link Victor. Somehow I missed that in my previous searches and it sounds exactly like my problem. I'm going to try turning off the appFabric workflow persistence option as suggested there... 

Posted by Community Admin on 18-Jan-2012 00:00

Update: I stopped the appfabric workflow services for my specific website in IIS then restarted the website & app pool, but still getting the "Missing Principal" errors. I then completely stopped the 2 appfabric services in Admin Tools > Services, restarted the website and still no good. 

Any other ideas? 

Posted by Community Admin on 23-Jan-2012 00:00

Hi Ben,

The situation is a bit strange, as in your case you still experience the error. What I can suggest you is to try and move your project on another server instance and set the site on IIS, without any additional services / applications installed. If the site runs flawlessly, you will know that the problem comes from your server environment, blocking Sitefinity from functioning properly.

Regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 13-Mar-2012 00:00

Just wanted to update this thread to help anyone in the future. We ended up completely uninstalling Microsoft AppFabric from our dev server and in all the problems mentioned here simply disappeared. 

Posted by Community Admin on 15-Mar-2012 00:00

Hello Ben,

Thank you for sharing your experience to the community. I am sure that it will be helpful when bumping into similar issue.

Kind regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed