Skip to main content
I'm developing in a different computer and different AD from where k2 Blackpearl is installed, how must be the connection string in visual studio (Environment Server Connection) to allow accessing objects and deploying processes?

 With this Connection string: 


 Authenticate=True;Integrated=True;IsPrimaryLogin=True;EncryptedPassword=False;Host=server;Port=5555;UserID=domainuser;Password=pass


When I test it, get the following error: 


The connection test failed for the following reason:


Authentication Failed : SEC_E_INTERNAL_ERROR


 


With this Connection String:


Integrated=True;IsPrimaryLogin=True;EncryptedPassword=False;Host=server;Port=5555;UserID=domainuser;Password=pass


The test succeeds but when I select Ok Button:


The following errors occured while connecting to the Environment Library:


Authentication required for session 854D4B26A11893798D90170FB55CC0D1


Details:


System.Exception: Authentication required for session 854D4B26A11893798D90170FB55CC0D1
   at SourceCode.Workflow.Plugins.EnvironmentSettings.EnvironmentPlugin.NotifyRefresh(Boolean changingServer)
   at SourceCode.Workflow.Plugins.EnvironmentSettings.ServerCanvas.CanvasModalWindow_OKClicked(Object sender, ModalWindowButtonClickEventArgs e)


Try this:


Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=host;WindowsDomain=domain;UserID=user;Password=password


You might want to take a look at the SCConnectionStringBuilder class which makes it easy to create connection strings.


Thanks for your help. 


Now In K2 Visual Studio -> General Properties, in the environment configuration everything is configured and tested (Category Server(s), smartobject server(s), ....), and I can deploy the process. But in the User Browser when I try to open Roles, Users or groups I get No connection could be made because the target machine actively refused it.   



Details:
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.Open(String connectionString)
at SourceCode.Workflow.Plugins.UserBrowser.UserBrowserHelper.InitializeRoleManagerServer()
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(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)
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.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.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.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)
at System.Windows.Window.Show()
at SourceCode.Workflow.Plugins.UserBrowser.UserBrowserHelper.ShowSearchWindow(ObjectBrowserPlugin parent)


Rui,


When I first saw your question, I thought you were talking about connection strings in code.  Now that I've re-read your question, I realize you were talking about the settings in Visual Studio.


Are you saying your blackpearl development server is in a different AD domain from your development machine?  The reason I ask, is because if you are trying to connect to your production server from your development Visual Studio, I always encourage people not to do that.  Technically, you can do it.  But I think there is a real danger in connecting your development box to the production server for deployments:  you could forget to change the settings back to development and accidentally deploy an unfinished/untested workflow to production (if you have export rights).


Unfortunately, I don’t have an answer for your error message.  Perhaps someone else will.  If not, open a helpdesk ticket to see if they have any suggestions.


I very recently closed out a ticket with K2 to do exactly what you are trying to do. Unfortunately, the answer was that it can not be done at this time.  I'd recommend that you make a VPC for development that is on the domain, or connect your development machine to the same domain as the server.  Sorry!

Rui,

How did you get this fixed? I'm having a similar problem


It works for me, thank you DavidL.


But the SDK about SCConnectionStringBuilder class doesn't have many details.


Reply