<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Exception while connecting to webservice (Thread)</title><description>   Today we have tried to connect our local Spira Installation  http://localhost/SpiraTeam        from a windows forms application using the reference               http://localhost/SpiraTeam/Services/v3_0/ImportExport.svc?wsdl                an exception occurs, what's wrong ?             the code:           test()      {       SpiraDemo.ServiceReference1.     ImportExportClient         test =      new      SpiraDemo.ServiceReference1.     ImportExportClient     (); &gt;&gt;exception         string      t =test.System_GetProductName();        }              An endpoint configuration section for contract 'ServiceReference1.IImportExport' could not be loaded because more than one endpoint configuration for that contract was found.  Please indicate the preferred endpoint configuration section by name.               at System.ServiceModel.Description.ConfigLoader.LookupChannel(ContextInformation configurationContext, String configurationName, ContractDescription contract, EndpointAddress address, Boolean wildcard, Boolean useChannelElementKind, ServiceEndpoint&amp; serviceEndpoint)           at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)           at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)           at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()           at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)           at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()           at System.ServiceModel.ClientBase`1..ctor()           at SpiraDemo.ServiceReference1.ImportExportClient..ctor() in D:\testprogramme\SpiraDemo\Service References\ServiceReference1\Reference.cs:line 9030           at SpiraDemo.Form1.button1_Click(Object sender, EventArgs e) in D:\testprogramme\SpiraDemo\Form1.cs:line 22           at System.Windows.Forms.Control.OnClick(EventArgs e)           at System.Windows.Forms.Button.OnClick(EventArgs e)           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)           at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)           at System.Windows.Forms.Control.WndProc(Message&amp; m)           at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)           at System.Windows.Forms.Button.WndProc(Message&amp; m)           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)           at System.Windows.Forms.Application.Run(Form mainForm)           at SpiraDemo.Program.Main() in D:\testprogramme\SpiraDemo\Program.cs:line 18           at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)           at System.Threading.ThreadHelper.ThreadStart()                 </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/issues-questions/113.aspx</link><item><guid isPermaLink="false">threadId=113</guid><author>pascal hoffmann (pascal.hoffmann@ch.sauter-bc.com)</author><title>Exception while connecting to webservice</title><description>   Today we have tried to connect our local Spira Installation  http://localhost/SpiraTeam        from a windows forms application using the reference               http://localhost/SpiraTeam/Services/v3_0/ImportExport.svc?wsdl                an exception occurs, what's wrong ?             the code:           test()      {       SpiraDemo.ServiceReference1.     ImportExportClient         test =      new      SpiraDemo.ServiceReference1.     ImportExportClient     (); &gt;&gt;exception         string      t =test.System_GetProductName();        }              An endpoint configuration section for contract 'ServiceReference1.IImportExport' could not be loaded because more than one endpoint configuration for that contract was found.  Please indicate the preferred endpoint configuration section by name.               at System.ServiceModel.Description.ConfigLoader.LookupChannel(ContextInformation configurationContext, String configurationName, ContractDescription contract, EndpointAddress address, Boolean wildcard, Boolean useChannelElementKind, ServiceEndpoint&amp; serviceEndpoint)           at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)           at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)           at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()           at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)           at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()           at System.ServiceModel.ClientBase`1..ctor()           at SpiraDemo.ServiceReference1.ImportExportClient..ctor() in D:\testprogramme\SpiraDemo\Service References\ServiceReference1\Reference.cs:line 9030           at SpiraDemo.Form1.button1_Click(Object sender, EventArgs e) in D:\testprogramme\SpiraDemo\Form1.cs:line 22           at System.Windows.Forms.Control.OnClick(EventArgs e)           at System.Windows.Forms.Button.OnClick(EventArgs e)           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)           at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)           at System.Windows.Forms.Control.WndProc(Message&amp; m)           at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)           at System.Windows.Forms.Button.WndProc(Message&amp; m)           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)           at System.Windows.Forms.Application.Run(Form mainForm)           at SpiraDemo.Program.Main() in D:\testprogramme\SpiraDemo\Program.cs:line 18           at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)           at System.Threading.ThreadHelper.ThreadStart()                 </description><pubDate>Tue, 12 Jul 2011 12:58:28 -0400</pubDate><a10:updated>2011-07-12T13:57:21-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/113.aspx</link></item><item><guid isPermaLink="false">messageId=219</guid><author>pascal hoffmann (pascal.hoffmann@ch.sauter-bc.com)</author><title> problem solved!, the initialsation needs an argument defined in the app.config                 so: </title><description> problem solved!, the initialsation needs an argument defined in the app.config                 so:    SpiraDemo.ServiceReference1.     ImportExportClient         test =      new      SpiraDemo.ServiceReference1.     ImportExportClient     (     "BasicHttpBinding_IImportExport"     );      But now we get an error on retrieving requirments although the authentication has been     executed ???           if      (test.Connection_Authenticate(     "user"     ,      "pwd"     ))    {         RemoteRequirement     [] reqs = test.Requirement_RetrieveForOwner(); &gt;&gt;    pÇÇ      {"The session was not authenticated, please call the Connection_Authenticate() method first"} </description><pubDate>Tue, 12 Jul 2011 13:57:20 -0400</pubDate><a10:updated>2011-07-12T13:57:20-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/113.aspx#reply219</link></item></channel></rss>