I am having a 'CodeNameNotUniqueException' error whereby after upgrading from v7.0.37 to v7.0.70 I am getting an error on loading my website. It looks like it is related to something to do with roles as the code name 'int-sg-ctx-nz-xa6-publisheddesktopoffice2013' is a role in my website. It basically happens to all the roles and not just this one. This is the error message that I get in event viewer:
Exception information:
Exception type: CodeNameNotUniqueException
Exception message: The object with code name 'int-sg-ctx-nz-xa6-publisheddesktopoffice2013' already exists.
at CMS.DataEngine.AbstractInfoProvider`2.SetInfoInternal(InfoType info)
at CMS.DataEngine.AbstractInfoProvider`2.SetInfo(InfoType info)
at CMS.SiteProvider.UserInfoProvider.EnsureRolesAndSitesInternal(UserInfo uInfo, Boolean isWindowsAuth)
at CMS.CMSHelper.AuthenticationHelper.EnsureExternalUser(UserInfo uInfo)
at CMS.CMSHelper.AuthenticationHelper.AuthenticateWindowsUser(String userName, SecurityIdentifier sid, String siteName, String[] roles)
at CMS.CMSHelper.ContextData.GetCurrentUser(Boolean& loadUserData, Boolean cacheResult)
at CMS.CMSHelper.ContextData.get_CurrentUser()
at CMSAppBase.CMSSessionStart(Object sender, EventArgs e)
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://aainsurance/CMSPages/PortalTemplate.aspx?aliaspath=/home
Request path: /CMSPages/PortalTemplate.aspx
User host address: 10.212.210.58
User: INT\U362515
Is authenticated: True
Authentication Type: NTLM
Thread account name: IIS APPPOOL\AAI.Intranet
Thread information:
Thread ID: 58
Thread account name: IIS APPPOOL\AAI.Intranet
Is impersonating: False
Stack trace: at CMS.DataEngine.AbstractInfoProvider`2.SetInfoInternal(InfoType info)
at CMS.DataEngine.AbstractInfoProvider`2.SetInfo(InfoType info)
at CMS.SiteProvider.UserInfoProvider.EnsureRolesAndSitesInternal(UserInfo uInfo, Boolean isWindowsAuth)
at CMS.CMSHelper.AuthenticationHelper.EnsureExternalUser(UserInfo uInfo)
at CMS.CMSHelper.AuthenticationHelper.AuthenticateWindowsUser(String userName, SecurityIdentifier sid, String siteName, String[] roles)
at CMS.CMSHelper.ContextData.GetCurrentUser(Boolean& loadUserData, Boolean cacheResult)
at CMS.CMSHelper.ContextData.get_CurrentUser()
at CMSAppBase.CMSSessionStart(Object sender, EventArgs e)
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Can anyone help with this? As of now I've had to rollback the database and restore the files for version 37 which is a shame as this version is not fully compatible with IE11.
Are you somewhere editing/creating user`s ID or GUID manually in your custom code?
Just FYI - kentico 7 has released more than one year before release of IE11 so it is really hard to support not existing product... Source: wiki devnet
Related
We have created a new OzLINK_WSE Web Service Endpoint for 5.30.001 and created a definition OzCustomer to enable searching based on Email address.
WSE Definition
We have tried two different searches but neither of them are working:-
The first (GetList)
var cust = c.GetList(new OzCustomer { Email = new StringValue { Value = "info#active-staffing.con" } }, false).Cast<OzCustomer>();
returns this error
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. --->
PX.Api.ContractBased.OperationDoesNotSupportValuesException: Operation does not support values.
at PX.Api.ContractBased.EntityService.GetList(EntityGateBase gate, String version, String name,
EntityImpl entity, Boolean returnFullEntities, Boolean ignoreValueFields, PXGraph graph)
at PX.Api.ContractBased.Soap.EntityGate.GetList(Entity entity, Boolean returnFullEntities)
--- End of inner exception stack trace ---
The second (Get)
var cust = c.Get(new OzCustomer { Email = new StringValue { Value = "info#active-staffing.con" } });
returns a different error
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> PX.Api.ContractBased.MoreThanOneEntitySatisfiesTheConditionException: More than one entity satisfies the condition.
at PX.Api.ContractBased.EntityService.Get(EntityGateBase gate, String version, String name, EntityImpl entity, Boolean returnFullEntity, PXGraph graph)
at PX.Api.ContractBased.Soap.EntityGate.Get(Entity entity)
--- End of inner exception stack trace ---
Could someone please advise how we can search for a Contact via Email address and avoid these issues.
Use StringSearch instead of StringValue in GetList:
var cust = c
.GetList(
new OzCustomer {
Email = new StringSearch { Value = "info#active-staffing.con" }
}, false)
.Cast<OzCustomer>();
We have a .net 2.0 exe that we are running on windows server 2008 r2. It gets stucks and stops with below info on Event log.
The same used to run correctly on windows server 2003. there are no code changes or rebuilds done in the migration to windows server 2008 r2.
We have tried putting lots of logs in exception in our code, but not sure from which line of code this error popups, but our normal logs do popup in the eventvwr, so doesnt look like permission issue on event viewer.
Any help or pointers on this would be helpful.
1) Exception Information
*********************************************
Exception Type: System.ComponentModel.Win32Exception
NativeErrorCode: 87
ErrorCode: -2147467259
Message: The parameter is incorrect
Data: System.Collections.ListDictionaryInternal
TargetSite: Void InternalWriteEvent(UInt32, UInt16, System.Diagnostics.EventLogEntryType, System.String[], Byte[], System.String)
HelpLink: NULL
Source: System
2) StackTrace Information
*********************************************
at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category)
at DefaultPublisher.WriteToLog(String entry, EventLogEntryType type)
at DefaultPublisher.Publish(Exception exception, NameValueCollection additionalInfo, NameValueCollection configSettings)
at ExceptionManager.Publish(Exception exception, NameValueCollection additionalInfo)
The message passed to WriteEntry() is too long. It's length must be less than 32706 characters
I installed UniVerse on the administrator account of a Parallels Windows installation. I subsequently created a second administrator account whose credentials I'm using to create the U2Connection.
However, when attempting to call GetSchema(...) I'm getting the following exception. I suspect this is permission-related but I'm not sure what I need to change.
{" [U2][UCINET-UO] [U2][UCINET][UNIVERSE]:\"*HS.OLEDBINFO\" is not in the CATALOG space.\r\n"}
at U2.Data.Client.Ucinet.UciStatement.ExecuteDirect(String pSQL)
at U2.Data.Client.U2Command.a(CommandBehavior A_0)
at U2.Data.Client.U2Command.ExecuteReaderObject(CommandBehavior behavior, String method, U2CursorType reqCursorType, Boolean abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, Int32 maxRows, Boolean skipInitialValidation)
at U2.Data.Client.U2Command.ExecuteReaderObject(CommandBehavior behavior, String method)
at U2.Data.Client.U2MetaDataFactory.b(U2Command& A_0, String A_1)
at U2.Data.Client.U2MetaDataFactory.v(String[] A_0)
at U2.Data.Client.U2MetaDataFactory.GetSchema(String collectionName, String[] restrictionValues)
at U2.Data.Client.U2Connection.GetSchema(String collectionName, String[] restrictionValues)
at U2.Data.Client.U2Connection.GetSchema(String collectionName)
at Connection.Program.Main(String[] args) in c:\Program Files (x86)\Rocket Software\U2 Toolkit for .NET\U2 Database Provider\samples\C#\UniVerse\Connection\Program.cs:line 30
I'm told: He is right for the second administrator account. All UniVerse users must have the permission to access the global catalog subroutines. That “*HS.OLEDBINFO” (%AHS.OLEDBINFO) will be in the “C:\U2\UV\catdir” folder by default.
Does that help?
I have a orchard website hosted on azure is connected to a sql azure database,I keep getting No row with the given identifier exists[Orchard.Roles.Models.PermissionRecord#33] here is the stack trace.
[ObjectNotFoundException: No row with the given identifier exists[Orchard.Roles.Models.PermissionRecord#33]]
NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +56
NHibernate.Proxy.AbstractLazyInitializer.CheckTargetState() +48
NHibernate.Proxy.AbstractLazyInitializer.Initialize() +87
NHibernate.Proxy.DefaultLazyInitializer.Intercept(InvocationInfo info) +85
PermissionRecordProxy.get_Name() +192
Orchard.Roles.Services.RoleService.GetPermissionsForRole(Int32 id) +128
Orchard.Roles.Services.RoleService.GetPermissionsForRoleByNameInner(String name) +37
Orchard.Roles.Services.<>c__DisplayClasse.<GetPermissionsForRoleByName>b__d(AcquireContext`1 ctx) +26
Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:57
Orchard.Caching.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:19
System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory) +125
Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\Cache.cs:17
Orchard.Caching.DefaultCacheManager.Get(TKey key, Func`2 acquire) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Caching\DefaultCacheManager.cs:33
Orchard.Roles.Services.RoleService.GetPermissionsForRoleByName(String name) +100
Orchard.Roles.Services.RolesBasedAuthorizationService.TryCheckAccess(Permission permission, IUser user, IContent content) +595
Orchard.Security.Authorizer.Authorize(Permission permission, IContent content, LocalizedString message) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\Authorizer.cs:72
Orchard.Security.Authorizer.Authorize(Permission permission) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\Authorizer.cs:60
Orchard.Security.SecurityFilter.OnAuthorization(AuthorizationContext filterContext) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Security\SecurityFilter.cs:24
System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +97
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +311
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +23
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +19
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Users\sebros\My Projects\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:162
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9629708
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
I've looked in the database at PermissionRecord table and there is no ID #33 in the database at all. When I download the orchard website to webmatrix to do local development on it, the website gives me no errors at all and works fine it's also correctly connected to the sql azure database. So I am a bit confused as to why this doesn't work on azure because it works locally and it should be using the same files as on the azure website since I downloaded the files directly from the azure website. Anyone have any ideas?
This is quite well overdue, but I ran into a similar situation this morning on orchard 1.6. Not sure how it occurred though! I hope this helps to anyone else that stumbles onto the same problem.
(I presume I had changed a modules permissions after it was enabled ages ago and hadnt noticed any problems until assigning a broken role to a user)
I used this bit of sql to find the offending record:
SELECT TOP (1000) MyPrefix_Orchard_Roles_RolesPermissionsRecord.Id, MyPrefix_Orchard_Roles_RolesPermissionsRecord.Role_id,
MyPrefix_Orchard_Roles_RolesPermissionsRecord.Permission_id, MyPrefix_Orchard_Roles_RolesPermissionsRecord.RoleRecord_Id,
MyPrefix_Orchard_Roles_RoleRecord.Name AS RoleName, MyPrefix_Orchard_Roles_PermissionRecord.Name AS PermissionName,
MyPrefix_Orchard_Roles_PermissionRecord.FeatureName AS PermissionFeatureName,
MyPrefix_Orchard_Roles_PermissionRecord.Description AS PermissionDescription
FROM MyPrefix_Orchard_Roles_RolesPermissionsRecord LEFT OUTER JOIN
MyPrefix_Orchard_Roles_PermissionRecord ON
MyPrefix_Orchard_Roles_RolesPermissionsRecord.Permission_id = MyPrefix_Orchard_Roles_PermissionRecord.Id LEFT OUTER JOIN
MyPrefix_Orchard_Roles_RoleRecord ON MyPrefix_Orchard_Roles_RolesPermissionsRecord.Role_id = MyPrefix_Orchard_Roles_RoleRecord.Id
WHERE (MyPrefix_Orchard_Roles_RolesPermissionsRecord.Role_id = 1) -- broken administrator role
Found that there were two records that were missing Permission records. One which had the RoleRecord_Id set to NULL and the other set to 1 - the admin. So when the permissions were loading with admin it would fail on looking up the Permission record. This helped the logging in part.
A couple of the role sections in admin still seemed broken: "Admin/Roles" so i ran the sql script above to find more of the offending rows from different roles.
I presume the random rows wont cause any problems and everything else seems to work as expected again.
Thanks, Matt
I have been getting this weird message in the ULS ever since I ported the code over to SharePoint 2010.
Here is the message:
w3wp.exe (0x1320)
0x1168 SharePoint Foundation
General
90hv
Unexpected
Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before.
Stack trace:
at Microsoft.SharePoint.SPWorkItem.FetchData()
at Microsoft.SharePoint.SPWorkItem.retrieveSchema(Schema schemaIndex)
at Microsoft.SharePoint.SPWorkItem.get_SiteId()
at Microsoft.SharePoint.SPWorkItem.Delete()
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.WorkItemDequeue(Transaction txn, Object[] transData)
at Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection items)
at System.Workflow.Runtime.WorkBatch.PendingWorkCollection.Commit(Transaction transaction)
at System.Workflow.Runtime.WorkBatch.Commit(Transaction transaction)
at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)
at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
at System.Workflow.Runtime.WorkflowExecutor.System.Workflow.ComponentModel.IWorkflowCoreRuntime.PersistInstanceState(Activity activity)
at System.Workflow.ComponentModel.Activity.MarkClosed()
at System.Workflow.ComponentModel.Activity.ReleaseLockOnStatusChange(IActivityEventListener1 eventListener)
at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.SafeReleaseLockOnStatusChange(ActivityExecutionContext context)
at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)
at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
at System.Workflow.Runtime.Scheduler.Run()
at System.Workflow.Runtime.WorkflowExecutor.RunScheduler()
at System.Workflow.Runtime.WorkflowExecutor.RunSome(Object ignored)
at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service)
at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunOne(Guid workflowInstanceId)
at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunWorkflow(Guid workflowInstanceId)
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow workflow, SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)
at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection1 events, TimeSpan timeOut)
at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection1 events, SPWorkflowRunOptionsInternal runOptions)
at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(Object context, SPWorkflowAssociation association, DateTime elevationTimeUtc, SPWorkflowEvent startEvent, SPWorkflowRunOptions runOptions)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.<>c_DisplayClass1.b_0(SPSite superUserSite, SPWeb superUserWeb)
at Microsoft.SharePoint.SPSecurity.<>c_DisplayClassf.b_e()
at Microsoft.SharePoint.SPSecurity.<>c_DisplayClass4.b_2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.ItemUpdated(SPItemEventProperties properties)
at Microsoft.SharePoint.SPEventManager.RunItemEventReceiver(SPItemEventReceiver receiver, SPUserCodeInfo userCodeInfo, SPItemEventProperties properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEventManager.RunItemEventReceiverHelper(Object receiver, SPUserCodeInfo userCodeInfo, Object properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEventManager.<>c_DisplayClassc`1.b_6()
at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](SPUserToken userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)
at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](Byte[] userTokenBytes, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)
at Microsoft.SharePoint.SPEventManager.HandleEventCallback[ReceiverType,PropertiesType](Object callbackData)
at Microsoft.SharePoint.Utilities.SPThreadPool.WaitCallbackWrapper(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
This message comes up whenever I run the workflow, it does not appear to have any harmful effects to the workflow.
Please let me know anything you folks know.
Here's the guidance from MS around the proper disposal of SharePoint objects. Odds are good that if you're following all of these (correctly) then your code will be ok. The SPDisposeCheck tool can also be helpful, although in my exeprience you still need to know all of the disposal rules. This tool only does a static analysis and can return a lot of candidate issues that may actually be fine.
When you read the exception more carefully you can see that you don't Forget to dispose the object. you reference it after it got disposed!
you can read more about it from the german SharePoint Guru Stefan Gossner