Accessing lists on a Sharepoint child site as opposed to the parent site


Badge +5

I have a problem where I would like to kickoff a workflow based on an event happening inside a child site (i.e. http://myparentsite/childsite) instead of the parent site (http://myparentsite).  K2 appears to want you to only work at the parent level however my lists and such are only within the child site.  When I specify the child site in the Sharepoint URL it tests fine however when I hit the browse button for Sharepoint Lists nothing happens.  If I change the Sharepoint URL to the parent site and hit the browse button for the Sharepoint List button then all the lists appear that are available at the parent level.


What I would like to know is how do I get access to the lists available at the child level?


10 replies

Userlevel 4
Badge +14

You can try adding the subsite as a service instance. This can be done from workspace > management console > SmartObjects > services > SharePoint services > add and add the subsite URL. You should be able to access the list from your ServiceObject Server. Vernon

Badge +5

Thanks for replying.  I tried to do what you suggested however I get the same error "Server was unable to process request -> User cannot be found".  Is accessing a list from a child site not a common thing?  It seems this would be a common request.


 

Userlevel 4
Badge +14

What exactly are you doing when getting the error?


Is this the error you get in the K2Serverlog? If not are there any errors thrown in the server log or in event viewer? Is it a domain user that is logged in to the machine? I take that the error occurs while in Studio? If so please go to the object browser > user browsers. Can you see the user there? You can also try searching for the user in workspace. This is just to see if the account exists and if it gets resolved.


Vernon

Badge +5

Vernon,


Again thanks for your help.  You are correct in assuming I am experiencing these issues in Visual Studio.  When I select Users in the Object Browser I get an "Invalid Packet Header Received" and the information below when I hit details. 


To explain my environment I have a VPC as my development workstation that is connecting to the Sharepoint server and K2 servers also in my development envrionment.  The user that I log into on my VPC is joined to the domain and is named "Administrator".  This user however cannot log into Sharepoint and I have another user that I connect to Sharepoint with called "App_Admin".    In the k2 Workspace under the Security tab I was able to add both "Administrator" and "App_Admin" to the allowed users.


 


System.Exception: Invalid Packet Header Received!!
   at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RecvHeader()
   at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.WindowsAuthentication(SCConnectionStringBuilder connectionStringBuilder)
   at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Authenticate(String ConnectionString)
   at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Open(String connectionString)
   at SourceCode.Workflow.Plugins.UserBrowser.UserBrowserHelper.InitializeRoleManagerServer()
   at SourceCode.Workflow.Plugins.UserBrowser.SearchUsersGroups.get_UserRoleManagerServer()
   at SourceCode.Workflow.Plugins.UserBrowser.SearchUsersGroups.SearchUsersGroups_Loaded(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32 flags)
   at System.Windows.Interop.HwndSource.Resize(Size newSize)
   at System.Windows.Interop.HwndSource.OnLayoutUpdated(Object obj, EventArgs args)
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Window.SetRootVisual()
   at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   at System.Windows.Window.CreateSourceWindowImpl()
   at System.Windows.Window.SafeCreateWindow()
   at System.Windows.Window.ShowHelper(Object booleanBox)

Badge +5

I have also attached a screenshot of what happens in Visual Studio when I set the Site URL to the child and then try to expand the "Lists" folder.  This only happens with the child site, at the parent site level the lists available for the parent site show up as expected.


15523i4764D4E9A7685EE7.jpg
Userlevel 4
Badge +14

Try the following:



1.)    Browse to ‘[Program files]K2 blackpearlin’ folder


2.)    Open ‘configurationmanager.config’ file with Notepad.


3.)    Under the ‘plugin’ section look for ‘<add key="UserBrowserServer" value="Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=167.0.0.2;Port=5555" />’


4.)    Change the Host value to your k2server’s ip address.



It seems to me you cant find the users.



vernon


Badge +5

Vernon,


Thanks for the help the combination of what you provided and chaning my VPC so that I was within Visual Studio seemed to allow me to view the Users.  However I'm still not able to see the lists at the Child Site level.  Also what happens if a List has a space such as "Due Items".  K2 seems to have problems showing anything.

Userlevel 4
Badge +14

What version of Blackpearl are you running? Can’t seem to recreate the issue.  Have you tried adding the child site as a service instance again? If possible can you provide the exact steps/settings/options you used when you created the sub site?


Vernon

Badge +5

I worked through the rest of my problems.  Thanks Vernon for the help.

Userlevel 4
Badge +14

It’s only a pleasure; can you maybe share with us what solved the Child site issue?


vernon


 

Reply