0

I am connecting my local system with SAP server using BizTalk adapter and also using Microsoft.servicemodel.channels to open the connection in sap to process XML as input file.

 SAPBinding binding = new SAPBinding(); binding.ReceiveTimeout = TimeSpan.MaxValue; binding.SendTimeout = TimeSpan.MaxValue; binding.EnableBusinessObjects = true; binding.EnableSafeTyping = true; EndpointAddress address = new EndpointAddress(SAPConnectionString); ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>(binding, address); // add credentials factory.Credentials.UserName.UserName = SAPUserName; factory.Credentials.UserName.Password = SAPPassword; // Open client factory.Open(TimeSpan.MaxValue); 

Factory.open cannot open the connection and it through an exception as A specified module could not be found, (Exception from HRESULT : 0x8007007E)

Kindly please help me

thanks in advance.

6
  • Please also show the assignment of variable binding? Commented Apr 8, 2015 at 9:36
  • yes @Gruff i edited my question please help me out Commented Apr 8, 2015 at 9:45
  • Is this code are enough for you. Commented Apr 8, 2015 at 9:48
  • Unfortunately not. It looks like there is a dependency on an assembly it is unable to find. Perhaps take a look at this: stackoverflow.com/questions/2522009/… Commented Apr 8, 2015 at 9:54
  • sorry @Gruff i couldn't share the full code. thanks for your reply, but the application created by someone but i want to fix this problem,it works on windows server (2008 R2).This application passes all the xml file to sap except only one with this error(Invalid character in the given encoding. Line 1, position 1374.) i checked the whole xml file also. May i know windows 8.1 is acceptable os to run biztalk or windows server os is need? because i deploying this application in 8.1 and also am new to sap also Commented Apr 8, 2015 at 10:02

1 Answer 1

0

The error message suggests there is a dependency on an assembly it is unable to find. Please note this is not something specific to WCF or the SAP adapter.

Googling for "HRESULT: 0x80070007E" I found: C# Unable to load DLL (Module could not be found HRESULT: 0x8007007E)

In David Heffernan's answer he recommends using tools like Dependency Walker to help debug dependency issues.

Sign up to request clarification or add additional context in comments.

5 Comments

while executing the application it shows "(There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Microsoft.Adapters.SAP.BizTalk, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64", "x86". This mismatch may cause runtime failures.)" this warning.
Hi sir, please have a look at this: stackoverflow.com/questions/10113532/…
Call GK ..Thanks @gruff at last i get rid of the error(HRESULT), Now its Connecting SAP..and While giving Input (XML file) it gives an error (Invalid character in the given encoding. Line 1, position 1374.)
You are most welcome. This new error is a different issue, perhaps for a different question? :)
@GopalKrishnan Welcome to Stack Overflow. If this answer helped you out, you should upvote & accept it - This is the Stack Overflow way of saying "Thank you". Read How does accepting an answer work if you don't know how.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.