SSIS Enpoint failure
Hello All, I'm getting an error that states "Could not find endpoint element with name 'BAReachServiceEndpoint1' and contract 'BAService.IBAService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element." I have an SSIS package using a DataFlow task. Inside that data flow task, is a Script Component as the Source. It will call a client's API. The app.config is as follows: <?xml version="1.0"?> <configuration> <configSections> </configSections> <startup><supportedRuntime version="v2.0.50727"/></startup><system.serviceModel> <bindings> <wsHttpBinding> <binding name="BAReachServiceEndpoint1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://www.blahba.com:12211/BAService.svc" binding="wsHttpBinding" bindingConfiguration="BAReachServiceEndpoint1" contract="BAService.IBAService" name="OSBAInReachServiceEndpoint1"> <identity> <userPrincipalName value="removed" /> </identity> </endpoint> </client> </system.serviceModel> </configuration> In my code I have: BAServiceClient service = new BAServiceClient("BAReachServiceEndpoint1"); The script component is set for .NET 3.5 Any help would be greaty appreciated. Thanks.
September 13th, 2010 8:42pm

Based on what I understood your package does not find its config file. Is the config file there? If this is not that, could elaborate more on your Script?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2010 8:54pm

The app.config file is there, I see it in the project. The source code of the script component is as follows: using System; using System.Data; using System.IO; using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime.Wrapper; using SC_8178acf6a755440280d48c5cda7ab219.csproj.BAService; [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute] public class ScriptMain : UserComponent { public override void CreateNewOutputRows() { // Initialize values BAServiceClient service = new BAServiceClient("BAInReachServiceEndpoint1"); service.ClientCredentials.Windows.ClientCredential.Domain = "a"; service.ClientCredentials.Windows.ClientCredential.UserName = "b"; service.ClientCredentials.Windows.ClientCredential.Password = "c"; CustomerResponse customerResponse = new CustomerResponse(); AuthenticationHeader authenticationHeader = new AuthenticationHeader { Username = Variables.AuthUN, Password = Variables.AuthPW }; Customer customer = new Customer(); int batchNumRecords = 50; int startRecord = 1; int totalRecords = 0; try { // Call GetCustomers and check if there are any records customerResponse = service.GetCustomers(authenticationHeader, customer, startRecord, batchNumRecords); } catch (Exception ex) { } } }
September 13th, 2010 9:00pm

If you right-click on the area between the tasks, and access the Package Configurations, do you see a config file there set to a proper place and the file is there?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2010 10:14pm

I don't have anything in there. Though, I'm not sure I would need to. Wouldn't it be looking at the app.config inside the script component?
September 13th, 2010 10:23pm

No, app.config is for reguar projects. Your SSIS cannot find it, what service you are trying to execute by the way, is it the service borker?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2010 10:34pm

I'm not sure what you are asking. Inside of my SSIS I have a DataFlow Task. Inside my DataFlow task, I have a Script Component as my source and an Ole DB as my Destination. Inside of my Script Component, I click "Edit Script". I then convert the project to .NET 3.5, add the Service Reference and put in my code. It all builds fine. The app.config is already updated with the proper binding and address via the "Add Service Reference" tool. I then try to run the package and I get the above error as stated. Why wouldn't the Script Component be able to read the app.config? It works properly for other script components that I have that are running.
September 13th, 2010 11:29pm

I then convert the project to .NET 3.5, add the Service Reference and put in my code. It all builds fine. What do you mean under the bolded out wording?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2010 11:36pm

After I click the "Edit Script", Visual Studio pops open for the script component. I right-click the project in Project Explorer and change the Target Framework to .NET 3.5
September 13th, 2010 11:44pm

I think the SSIS does not see the reference in your script. I suggest you use instead the Web Service task, how about this?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2010 12:01am

I don't think the Web Service Task supports complex data types. Either way, I have used the Script Component before with a web service and it has worked. The only difference was that I used "Add Web Reference" instead of "Add Service Reference" that I'm using now.
September 14th, 2010 12:04am

Hi I'm having exact the same issue here and couldn't resolve it. Have you found the anwser to this issue? Thanks!
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 11:44am

I had the same problem and ended up following (mostly) what was posted here: http://forums.techarena.in/software-development/1295596.htm Code: System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding(System.ServiceModel.BasicHttpSecurityMode.None); //Transport); System.ServiceModel.EndpointAddress remoteAddress = new System.ServiceModel.EndpointAddress("http://abc.com/WebServiceManager.svc"); //System.ServiceModel.Description.ClientCredentials loginCredentials= new System.ServiceModel.Description.ClientCredentials(); //loginCredentials.UserName.UserName = "theuser"; //loginCredentials.UserName.Password = "secretpassword"; System.ServiceModel.Description.ContractDescription contract = new System.ServiceModel.Description.ContractDescription("contractName"); System.ServiceModel.Description.ServiceEndpoint endpoint = new System.ServiceModel.Description.ServiceEndpoint(contract, binding, remoteAddress); endpoint.Address = remoteAddress; OrderRequestProcessorClient orderRequestProcessorClient = new OrderRequestProcessorClient(binding, remoteAddress);
May 31st, 2011 2:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics